Skip to content

Commit

Permalink
tweak quick pick pin conditional (#165285)
Browse files Browse the repository at this point in the history
tweak conditional
  • Loading branch information
meganrogge authored Nov 2, 2022
1 parent 9dd6ae2 commit 87bf037
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vs/platform/quickinput/browser/quickPickPin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});

Expand Down

0 comments on commit 87bf037

Please sign in to comment.