From 8328e8131d9a23171263a6ea80188b1f333d9df0 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Wed, 28 Oct 2026 22:12:42 +0800 Subject: [PATCH] Clear moved items from the selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move To only cleared the selection when more than one item moved, so a single moved item stayed selected — invisible — in the target workspace. Moved items are now always removed from the selection. --- Sources/Prompt/PanelView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/Prompt/PanelView.swift b/Sources/Prompt/PanelView.swift index 5c69b47..06297cd 100644 --- a/Sources/Prompt/PanelView.swift +++ b/Sources/Prompt/PanelView.swift @@ -354,7 +354,11 @@ struct PanelView: View { ForEach(store.sections.filter { $0.id != store.sectionID(of: item.id) }) { section in Button(section.name) { store.move(ids: ids, to: section.id) - if multiple { clearSelection() } + // Moved items leave the current view, so they must + // leave the selection too — otherwise they stay + // selected, invisible, in the target workspace. + selection.subtract(ids) + lastSelectedID = nil } } }