Skip to content

Commit

Permalink
Fixes #142020: Also listen to IFileService.onDidRunOperation and lo…
Browse files Browse the repository at this point in the history
…ok at written files
  • Loading branch information
alexdima committed Feb 4, 2022
1 parent fd0b5d8 commit 02e130a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { commandsExtensionPoint } from 'vs/workbench/services/actions/common/men
import { Disposable } from 'vs/base/common/lifecycle';
import { RunOnceScheduler } from 'vs/base/common/async';
import { URI } from 'vs/base/common/uri';
import { IFileService } from 'vs/platform/files/common/files';
import { FileOperation, IFileService } from 'vs/platform/files/common/files';
import { parse } from 'vs/base/common/json';
import * as objects from 'vs/base/common/objects';
import { IKeyboardLayoutService } from 'vs/platform/keyboardLayout/common/keyboardLayout';
Expand Down Expand Up @@ -732,6 +732,12 @@ class UserKeybindings extends Disposable {
logService.debug('Keybindings file changed');
this.reloadConfigurationScheduler.schedule();
}));
this._register(this.fileService.onDidRunOperation((e) => {
if (e.operation === FileOperation.WRITE && e.resource.toString() === this.keybindingsResource.toString()) {
logService.debug('Keybindings file written');
this.reloadConfigurationScheduler.schedule();
}
}));
}

async initialize(): Promise<void> {
Expand Down

0 comments on commit 02e130a

Please sign in to comment.