Skip to content

Commit 87bf037

Browse files
authored
tweak quick pick pin conditional (microsoft#165285)
tweak conditional
1 parent 9dd6ae2 commit 87bf037

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/platform/quickinput/browser/quickPickPin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ export async function showWithPinnedItems(storageService: IStorageService, stora
3030
}
3131
});
3232
quickPick.onDidChangeValue(async value => {
33-
// If the items are pinnable (top level quick pick), update items such that
34-
// pinned are excluded from the search results
35-
if (quickPick.items.some(i => i.buttons?.some(b => b.iconClass === pinButtonClass))) {
36-
quickPick.items = value ? itemsWithoutPinned : itemsWithPinned;
33+
if (quickPick.items === itemsWithPinned && value) {
34+
quickPick.items = itemsWithoutPinned;
35+
} else if (quickPick.items === itemsWithoutPinned && !value) {
36+
quickPick.items = itemsWithPinned;
3737
}
3838
});
3939

0 commit comments

Comments
 (0)