Skip to content

Commit

Permalink
Focus panel if maximized otherwise editor (#236211)
Browse files Browse the repository at this point in the history
  • Loading branch information
benibenj authored Dec 16, 2024
1 parent 002eaa5 commit 1bbe4e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
}

focus(): void {
this.focusPart(Parts.EDITOR_PART, getWindow(this.activeContainer));
if (this.isPanelMaximized() && this.mainContainer === this.activeContainer) {
this.focusPart(Parts.PANEL_PART);
} else {
this.focusPart(Parts.EDITOR_PART, getWindow(this.activeContainer));
}
}

private focusPanelOrEditor(): void {
Expand Down

0 comments on commit 1bbe4e9

Please sign in to comment.