Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak quick pick pin conditional #165285

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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