Skip to content

Commit

Permalink
refs #142176 (#142423)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbatten authored Feb 9, 2022
1 parent 1ebe50c commit 22fb1cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
width: viewSize.width + sizeChangePxWidth,
height: viewSize.height
});

break;
case Parts.EDITOR_PART:
viewSize = this.workbenchGrid.getViewSize(this.editorPartView);

Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/parts/views/viewsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ function getPaneCompositeExtension(viewContainerLocation: ViewContainerLocation)
}
}

function getPartByLocation(viewContainerLocation: ViewContainerLocation): Parts.AUXILIARYBAR_PART | Parts.SIDEBAR_PART | Parts.PANEL_PART {
export function getPartByLocation(viewContainerLocation: ViewContainerLocation): Parts.AUXILIARYBAR_PART | Parts.SIDEBAR_PART | Parts.PANEL_PART {
switch (viewContainerLocation) {
case ViewContainerLocation.AuxiliaryBar:
return Parts.AUXILIARYBAR_PART;
Expand Down
8 changes: 5 additions & 3 deletions src/vs/workbench/contrib/terminal/browser/terminalGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ITerminalInstance, Direction, ITerminalGroup, ITerminalService, ITermin
import { ViewContainerLocation, IViewDescriptorService } from 'vs/workbench/common/views';
import { IShellLaunchConfig, ITerminalTabLayoutInfoById } from 'vs/platform/terminal/common/terminal';
import { TerminalStatus } from 'vs/workbench/contrib/terminal/browser/terminalStatusList';
import { getPartByLocation } from 'vs/workbench/browser/parts/views/viewsService';

const SPLIT_PANE_MIN_SIZE = 120;

Expand Down Expand Up @@ -49,7 +50,7 @@ class SplitPaneContainer extends Disposable {
this._addChild(instance, index);
}

resizePane(index: number, direction: Direction, amount: number): void {
resizePane(index: number, direction: Direction, amount: number, part: Parts): void {
const isHorizontal = (direction === Direction.Left) || (direction === Direction.Right);

if ((isHorizontal && this.orientation !== Orientation.HORIZONTAL) ||
Expand All @@ -59,7 +60,8 @@ class SplitPaneContainer extends Disposable {
(this.orientation === Orientation.VERTICAL && direction === Direction.Right)) {
amount *= -1;
}
this._layoutService.resizePart(Parts.PANEL_PART, amount, amount);

this._layoutService.resizePart(part, amount, amount);
return;
}

Expand Down Expand Up @@ -559,7 +561,7 @@ export class TerminalGroup extends Disposable implements ITerminalGroup {
// TODO: Support letter spacing and line height
const amount = isHorizontal ? font.charWidth : font.charHeight;
if (amount) {
this._splitPaneContainer.resizePane(this._activeInstanceIndex, direction, amount);
this._splitPaneContainer.resizePane(this._activeInstanceIndex, direction, amount, getPartByLocation(this._terminalLocation));
}
}

Expand Down

0 comments on commit 22fb1cf

Please sign in to comment.