From 0da5dc44ab2d024554e9c8f171df817c8b87c065 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 16 Aug 2017 07:51:03 +0200 Subject: [PATCH] Keybinding text is not upadated on the menu (fixes #32574) --- src/vs/code/electron-main/keyboard.ts | 8 ++++---- src/vs/workbench/electron-browser/window.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/code/electron-main/keyboard.ts b/src/vs/code/electron-main/keyboard.ts index 8ae8e354087..ae894658a67 100644 --- a/src/vs/code/electron-main/keyboard.ts +++ b/src/vs/code/electron-main/keyboard.ts @@ -108,10 +108,6 @@ export class KeybindingsResolver { private registerListeners(): void { - // Resolve keybindings when any first window is loaded - const onceOnWindowReady = once(this.windowsService.onWindowReady); - onceOnWindowReady(win => this.resolveKeybindings(win)); - // Listen to resolved keybindings from window ipc.on('vscode:keybindingsResolved', (event, rawKeybindings: string) => { let keybindings: IKeybinding[] = []; @@ -148,6 +144,10 @@ export class KeybindingsResolver { } }); + // Resolve keybindings when any first window is loaded + const onceOnWindowReady = once(this.windowsService.onWindowReady); + onceOnWindowReady(win => this.resolveKeybindings(win)); + // Resolve keybindings again when keybindings.json changes this.keybindingsWatcher.onDidUpdateConfiguration(() => this.resolveKeybindings()); diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index e8c81f8e2b4..444e7115e17 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -341,7 +341,7 @@ export class ElectronWindow extends Themable { } private resolveKeybindings(actionIds: string[]): TPromise<{ id: string; label: string, isNative: boolean; }[]> { - return this.partService.joinCreation().then(() => { + return TPromise.join([this.partService.joinCreation(), this.extensionService.onReady()]).then(() => { return arrays.coalesce(actionIds.map(id => { const binding = this.keybindingService.lookupKeybinding(id); if (!binding) { -- GitLab