diff --git a/src/vs/editor/contrib/codeAction/codeActionWidget.ts b/src/vs/editor/contrib/codeAction/codeActionWidget.ts index 06aa9f062317..03b9b036b8e2 100644 --- a/src/vs/editor/contrib/codeAction/codeActionWidget.ts +++ b/src/vs/editor/contrib/codeAction/codeActionWidget.ts @@ -95,18 +95,18 @@ export class CodeActionWidget extends Disposable { } private resolveKeybindings(actions: readonly CodeActionAction[]): Map { - const codeActionCommands = new Set([ + const codeActionCommands: readonly string[] = [ refactorCommandId, codeActionCommandId, sourceActionCommandId, organizeImportsCommandId, fixAllCommandId - ]); + ]; // Lazy since we may not actually ever read the value const allCodeActionBindings = new Lazy(() => this._keybindingService.getKeybindings() - .filter(item => codeActionCommands.has(item.command!)) + .filter(item => codeActionCommands.indexOf(item.command!) >= 0) .filter(item => item.resolvedKeybinding) .map((item): ResolveCodeActionKeybinding => { // Special case these commands since they come built-in with VS Code and don't use 'commandArgs'