Skip to content

Commit

Permalink
Support 'when':'true' in 'commandPalette' menus
Browse files Browse the repository at this point in the history
Adds a missing check for "true" on contributed "commandPalette" menus

Fixes: #9065

Signed-off-by: Alvaro Sanchez-Leon <[email protected]>
  • Loading branch information
alvsan09 authored and vince-fugnitto committed Mar 22, 2021
1 parent 5dc9612 commit 309fab4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ export class QuickCommandService implements QuickOpenModel, QuickOpenHandler {
raw.forEach((command: Command) => {
if (command.label) {
const contexts = this.contexts.get(command.id);
if (!contexts || contexts.some(when => this.contextKeyService.match(when))) {
if (!contexts || contexts.some(when => {
when = when.trim();
return when === 'true' || this.contextKeyService.match(when);
})) {
valid.push(command);
}
}
Expand Down

0 comments on commit 309fab4

Please sign in to comment.