Skip to content

Commit 1008c8e

Browse files
committed
Reset active items and update selection handling in workspace file quick pick
- once a file is choosen, the quick pick should not close, just select it and change highlight - initially nothing should be selected (or highlighted) └── apps └── editor └── src ├── commands │ └── select-workspace-file-command.ts └── utils └── show-parent-folder-quick-pick.ts
1 parent d1b39fd commit 1008c8e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/editor/src/commands/select-workspace-file-command.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const select_workspace_file_command = (
3535
(resolve) => {
3636
const quick_pick = vscode.window.createQuickPick()
3737
quick_pick.items = items
38+
quick_pick.activeItems = []
3839
quick_pick.placeholder = t(
3940
'command.select-workspace-file.select-workspace'
4041
)
@@ -127,6 +128,7 @@ export const select_workspace_file_command = (
127128
) {
128129
if (file_items_cache.length > 0) {
129130
quick_pick.items = file_items_cache
131+
quick_pick.activeItems = []
130132
}
131133
quick_pick.value = last_search_query
132134
quick_pick.show()
@@ -217,6 +219,7 @@ export const select_workspace_file_command = (
217219

218220
file_items_cache = items
219221
quick_pick.items = items
222+
quick_pick.activeItems = []
220223
quick_pick.busy = false
221224

222225
if (last_interacted_path) {
@@ -241,7 +244,8 @@ export const select_workspace_file_command = (
241244
selected.full_path
242245
])
243246
}
244-
quick_pick.hide()
247+
248+
quick_pick.activeItems = [selected]
245249
}
246250
})
247251

0 commit comments

Comments
 (0)