From 27a1eff190903a472dc52d2e4900419dc5dba2fe Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 12 Mar 2019 20:53:35 +0100 Subject: [PATCH] Fix #70230 --- .../keybinding/common/keybindingResolver.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vs/platform/keybinding/common/keybindingResolver.ts b/src/vs/platform/keybinding/common/keybindingResolver.ts index 9b714a1150e..d44258a9c1b 100644 --- a/src/vs/platform/keybinding/common/keybindingResolver.ts +++ b/src/vs/platform/keybinding/common/keybindingResolver.ts @@ -314,7 +314,7 @@ export class KeybindingResolver { public static getAllUnboundCommands(boundCommands: Map): string[] { const unboundCommands: string[] = []; const seenMap: Map = new Map(); - const addCommand = id => { + const addCommand = (id: string, includeCommandWithArgs: boolean) => { if (seenMap.has(id)) { return; } @@ -325,18 +325,20 @@ export class KeybindingResolver { if (boundCommands.get(id) === true) { return; } - const command = CommandsRegistry.getCommand(id); - if (command && typeof command.description === 'object' - && isNonEmptyArray((command.description).args)) { // command with args - return; + if (!includeCommandWithArgs) { + const command = CommandsRegistry.getCommand(id); + if (command && typeof command.description === 'object' + && isNonEmptyArray((command.description).args)) { // command with args + return; + } } unboundCommands.push(id); }; for (const id in MenuRegistry.getCommands()) { - addCommand(id); + addCommand(id, true); } for (const id in CommandsRegistry.getCommands()) { - addCommand(id); + addCommand(id, false); } return unboundCommands; -- GitLab