Skip to content

Commit dd3e9ee

Browse files
committed
repl: cmd + f to focus filter
1 parent 208fe75 commit dd3e9ee

File tree

1 file changed

+6
-4
lines changed
  • src/vs/workbench/contrib/debug/browser

1 file changed

+6
-4
lines changed

src/vs/workbench/contrib/debug/browser/repl.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
9696
private modelChangeListener: IDisposable = Disposable.None;
9797
private filter: ReplFilter;
9898
private filterState: TreeFilterState;
99+
private filterActionViewItem: TreeFilterPanelActionViewItem | undefined;
99100

100101
constructor(
101102
options: IViewPaneOptions,
@@ -276,8 +277,8 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
276277
this.navigateHistory(false);
277278
}
278279

279-
focusRepl(): void {
280-
this.tree.domFocus();
280+
focusFilter(): void {
281+
this.filterActionViewItem?.focus();
281282
}
282283

283284
private setMode(): void {
@@ -458,7 +459,8 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
458459
if (action.id === SelectReplAction.ID) {
459460
return this.instantiationService.createInstance(SelectReplActionViewItem, this.selectReplAction);
460461
} else if (action.id === FILTER_ACTION_ID) {
461-
return this.instantiationService.createInstance(TreeFilterPanelActionViewItem, action, localize('workbench.debug.filter.placeholder', "Filter. E.g.: text, !exclude"), this.filterState);
462+
this.filterActionViewItem = this.instantiationService.createInstance(TreeFilterPanelActionViewItem, action, localize('workbench.debug.filter.placeholder', "Filter. E.g.: text, !exclude"), this.filterState);
463+
return this.filterActionViewItem;
462464
}
463465

464466
return super.getActionViewItem(action);
@@ -764,7 +766,7 @@ class FilterReplAction extends EditorAction {
764766
run(accessor: ServicesAccessor, editor: ICodeEditor): void | Promise<void> {
765767
SuggestController.get(editor).acceptSelectedSuggestion(false, true);
766768
const repl = getReplView(accessor.get(IViewsService));
767-
repl?.focusRepl();
769+
repl?.focusFilter();
768770
}
769771
}
770772

0 commit comments

Comments
 (0)