diff --git a/src/vs/platform/quickinput/browser/quickPickPin.ts b/src/vs/platform/quickinput/browser/quickPickPin.ts index 7951674b10900..6ae4fd5a94c43 100644 --- a/src/vs/platform/quickinput/browser/quickPickPin.ts +++ b/src/vs/platform/quickinput/browser/quickPickPin.ts @@ -30,9 +30,13 @@ export async function showWithPinnedItems(storageService: IStorageService, stora } }); quickPick.onDidChangeValue(async value => { - // Return pinned items if there is no search value - quickPick.items = value ? itemsWithoutPinned : itemsWithPinned; + // If the items are pinnable (top level quick pick), update items such that + // pinned are excluded from the search results + if (quickPick.items.some(i => i.buttons?.some(b => b.iconClass === pinButtonClass))) { + quickPick.items = value ? itemsWithoutPinned : itemsWithPinned; + } }); + quickPick.items = quickPick.value ? itemsWithoutPinned : itemsWithPinned; quickPick.show(); } diff --git a/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts b/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts index d968ffeae561e..011726462fd6e 100644 --- a/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts +++ b/src/vs/workbench/contrib/tasks/browser/taskQuickPick.ts @@ -284,8 +284,8 @@ export class TaskQuickPick extends Disposable { // Proceed to second level of quick pick if (selectedEntry && !selectedEntry.settingType && selectedEntry.task === null) { // The user has chosen to go back to the first level - firstLevelTask = await this._doPickerFirstLevel(picker, (await this.getTopLevelEntries(defaultEntry)).entries); picker.value = ''; + firstLevelTask = await this._doPickerFirstLevel(picker, (await this.getTopLevelEntries(defaultEntry)).entries); } else if (selectedEntry && Types.isString(selectedEntry.settingType)) { picker.dispose(); return this.handleSettingOption(selectedEntry.settingType);