提交 93cfe58e 编写于 作者: N Nilesh

keybindingsEditor GUI follows settings now.

上级 73025ec4
......@@ -110,6 +110,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
}
setInput(input: KeybindingsEditorInput, options: EditorOptions, token: CancellationToken): Thenable<void> {
this.searchWidget.setValue(input.defaultSearchValue);
return super.setInput(input, options, token)
.then(() => this.render(options && options.preserveFocus, token));
}
......
......@@ -243,7 +243,15 @@ export class PreferencesService extends Disposable implements IPreferencesServic
return this.editorService.openEditor({ resource: editableKeybindings, options: { pinned: true } }).then(editors => void 0);
});
}
return this.editorService.openEditor(this.instantiationService.createInstance(KeybindingsEditorInput), { pinned: true }).then(() => null);
const keybindingsEditorInput = this.instantiationService.createInstance(KeybindingsEditorInput);
if (openDefaultKeybindings) {
keybindingsEditorInput.setDefaultSearchValue('@source:uesr');
} else {
keybindingsEditorInput.setDefaultSearchValue();
}
return this.editorService.openEditor(keybindingsEditorInput, { pinned: true }).then(() => null);
}
openRawDefaultKeybindings(): TPromise<IEditor> {
......
......@@ -56,6 +56,7 @@ export class KeybindingsEditorInput extends EditorInput {
public static readonly ID: string = 'workbench.input.keybindings';
public readonly keybindingsModel: KeybindingsEditorModel;
public defaultSearchValue: string;
constructor(@IInstantiationService instantiationService: IInstantiationService) {
super();
......@@ -77,6 +78,10 @@ export class KeybindingsEditorInput extends EditorInput {
matches(otherInput: any): boolean {
return otherInput instanceof KeybindingsEditorInput;
}
setDefaultSearchValue(defaultSearchValue = ''): void {
this.defaultSearchValue = defaultSearchValue;
}
}
export class SettingsEditor2Input extends EditorInput {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册