Skip to content

Commit 6283ef3

Browse files
committed
🔨 Register breadcrumbs.focus command via registerAction2
Signed-off-by: Babak K. Shandiz <[email protected]>
1 parent 1c37752 commit 6283ef3

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,27 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
573573
handler: accessor => focusAndSelectHandler(accessor, false)
574574
});
575575

576+
registerAction2(class FocusBreadcrumbs extends Action2 {
577+
constructor() {
578+
super({
579+
id: 'breadcrumbs.focus',
580+
title: {
581+
value: localize('cmd.focus', "Focus Breadcrumbs"),
582+
original: 'Focus Breadcrumbs'
583+
},
584+
precondition: BreadcrumbsControl.CK_BreadcrumbsVisible,
585+
keybinding: {
586+
weight: KeybindingWeight.WorkbenchContrib,
587+
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Semicolon,
588+
when: BreadcrumbsControl.CK_BreadcrumbsPossible,
589+
}
590+
});
591+
}
592+
run(accessor: ServicesAccessor, ...args: any[]): void {
593+
focusAndSelectHandler(accessor, false);
594+
}
595+
});
596+
576597
// this commands is only enabled when breadcrumbs are
577598
// disabled which it then enables and focuses
578599
KeybindingsRegistry.registerCommandAndKeybindingRule({

0 commit comments

Comments
 (0)