mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 09:10:30 -04:00
Merge from vscode e558dc6ea73a75bd69d7a0b485f0e7e4194c66bf (#6864)
This commit is contained in:
@@ -109,7 +109,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
||||
) {
|
||||
super(KeybindingsEditor.ID, telemetryService, themeService, storageService);
|
||||
this.delayedFiltering = new Delayer<void>(300);
|
||||
this._register(keybindingsService.onDidUpdateKeybindings(() => this.render(true)));
|
||||
this._register(keybindingsService.onDidUpdateKeybindings(() => this.render(!!this.keybindingFocusContextKey.get())));
|
||||
|
||||
this.keybindingsEditorContextKey = CONTEXT_KEYBINDINGS_EDITOR.bindTo(this.contextKeyService);
|
||||
this.searchFocusContextKey = CONTEXT_KEYBINDINGS_SEARCH_FOCUS.bindTo(this.contextKeyService);
|
||||
@@ -537,7 +537,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
||||
}
|
||||
this.unAssignedKeybindingItemToRevealAndFocus = null;
|
||||
} else if (currentSelectedIndex !== -1 && currentSelectedIndex < this.listEntries.length) {
|
||||
this.selectEntry(currentSelectedIndex);
|
||||
this.selectEntry(currentSelectedIndex, preserveFocus);
|
||||
} else if (this.editorService.activeControl === this && !preserveFocus) {
|
||||
this.focus();
|
||||
}
|
||||
@@ -597,11 +597,13 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
||||
return -1;
|
||||
}
|
||||
|
||||
private selectEntry(keybindingItemEntry: IKeybindingItemEntry | number): void {
|
||||
private selectEntry(keybindingItemEntry: IKeybindingItemEntry | number, focus: boolean = true): void {
|
||||
const index = typeof keybindingItemEntry === 'number' ? keybindingItemEntry : this.getIndexOf(keybindingItemEntry);
|
||||
if (index !== -1) {
|
||||
this.keybindingsList.getHTMLElement().focus();
|
||||
this.keybindingsList.setFocus([index]);
|
||||
if (focus) {
|
||||
this.keybindingsList.getHTMLElement().focus();
|
||||
this.keybindingsList.setFocus([index]);
|
||||
}
|
||||
this.keybindingsList.setSelection([index]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ export class TOCRenderer implements ITreeRenderer<SettingsTreeGroupElement, neve
|
||||
const label = element.label;
|
||||
|
||||
template.labelElement.textContent = label;
|
||||
template.labelElement.title = label;
|
||||
|
||||
if (count) {
|
||||
template.countElement.textContent = ` (${count})`;
|
||||
|
||||
Reference in New Issue
Block a user