From 889d1f38526aa7c681f75fa005e59ab31f3776d9 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Wed, 2 Nov 2022 14:37:17 -0700 Subject: [PATCH] tweak conditional --- src/vs/platform/quickinput/browser/quickPickPin.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/quickinput/browser/quickPickPin.ts b/src/vs/platform/quickinput/browser/quickPickPin.ts index 6ae4fd5a94c43..158f7e9bec083 100644 --- a/src/vs/platform/quickinput/browser/quickPickPin.ts +++ b/src/vs/platform/quickinput/browser/quickPickPin.ts @@ -30,10 +30,10 @@ export async function showWithPinnedItems(storageService: IStorageService, stora } }); quickPick.onDidChangeValue(async value => { - // 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; + if (quickPick.items === itemsWithPinned && value) { + quickPick.items = itemsWithoutPinned; + } else if (quickPick.items === itemsWithoutPinned && !value) { + quickPick.items = itemsWithPinned; } });