Skip to content

Commit

Permalink
Pressing F6 on Windows doesn't navigate to the secondary side bar (fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored Apr 29, 2024
1 parent 2ad9cb5 commit 1d05283
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/vs/workbench/browser/actions/navigationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,13 @@ abstract class BaseFocusAction extends Action2 {
neighbour = next ? Parts.PANEL_PART : Parts.SIDEBAR_PART;
break;
case Parts.PANEL_PART:
neighbour = next ? Parts.STATUSBAR_PART : Parts.EDITOR_PART;
neighbour = next ? Parts.AUXILIARYBAR_PART : Parts.EDITOR_PART;
break;
case Parts.AUXILIARYBAR_PART:
neighbour = next ? Parts.STATUSBAR_PART : Parts.PANEL_PART;
break;
case Parts.STATUSBAR_PART:
neighbour = next ? Parts.ACTIVITYBAR_PART : Parts.PANEL_PART;
neighbour = next ? Parts.ACTIVITYBAR_PART : Parts.AUXILIARYBAR_PART;
break;
case Parts.ACTIVITYBAR_PART:
neighbour = next ? Parts.SIDEBAR_PART : Parts.STATUSBAR_PART;
Expand Down Expand Up @@ -306,6 +309,8 @@ abstract class BaseFocusAction extends Action2 {
currentlyFocusedPart = Parts.STATUSBAR_PART;
} else if (layoutService.hasFocus(Parts.SIDEBAR_PART)) {
currentlyFocusedPart = Parts.SIDEBAR_PART;
} else if (layoutService.hasFocus(Parts.AUXILIARYBAR_PART)) {
currentlyFocusedPart = Parts.AUXILIARYBAR_PART;
} else if (layoutService.hasFocus(Parts.PANEL_PART)) {
currentlyFocusedPart = Parts.PANEL_PART;
}
Expand Down
4 changes: 4 additions & 0 deletions src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
this.paneCompositeService.getActivePaneComposite(ViewContainerLocation.Sidebar)?.focus();
break;
}
case Parts.AUXILIARYBAR_PART: {
this.paneCompositeService.getActivePaneComposite(ViewContainerLocation.AuxiliaryBar)?.focus();
break;
}
case Parts.ACTIVITYBAR_PART:
(this.getPart(Parts.SIDEBAR_PART) as SidebarPart).focusActivityBar();
break;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/parts/paneCompositePart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ export abstract class AbstractPaneCompositePart extends CompositePart<PaneCompos
this.hideActiveComposite();
}

protected focusComositeBar(): void {
protected focusCompositeBar(): void {
this.paneCompositeBar.value?.focus();
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class SidebarPart extends AbstractPaneCompositePart {
}

if (this.shouldShowCompositeBar()) {
this.focusComositeBar();
this.focusCompositeBar();
} else {
if (!this.layoutService.isVisible(Parts.ACTIVITYBAR_PART)) {
this.layoutService.setPartHidden(false, Parts.ACTIVITYBAR_PART);
Expand Down

0 comments on commit 1d05283

Please sign in to comment.