提交 0da5dc44 编写于 作者: B Benjamin Pasero

Keybinding text is not upadated on the menu (fixes #32574)

上级 728b2f9a
......@@ -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());
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册