Skip to content

Commit 22fb1cf

Browse files
authored
1 parent 1ebe50c commit 22fb1cf

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/vs/workbench/browser/layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
13231323
width: viewSize.width + sizeChangePxWidth,
13241324
height: viewSize.height
13251325
});
1326-
1326+
break;
13271327
case Parts.EDITOR_PART:
13281328
viewSize = this.workbenchGrid.getViewSize(this.editorPartView);
13291329

src/vs/workbench/browser/parts/views/viewsService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ function getPaneCompositeExtension(viewContainerLocation: ViewContainerLocation)
631631
}
632632
}
633633

634-
function getPartByLocation(viewContainerLocation: ViewContainerLocation): Parts.AUXILIARYBAR_PART | Parts.SIDEBAR_PART | Parts.PANEL_PART {
634+
export function getPartByLocation(viewContainerLocation: ViewContainerLocation): Parts.AUXILIARYBAR_PART | Parts.SIDEBAR_PART | Parts.PANEL_PART {
635635
switch (viewContainerLocation) {
636636
case ViewContainerLocation.AuxiliaryBar:
637637
return Parts.AUXILIARYBAR_PART;

src/vs/workbench/contrib/terminal/browser/terminalGroup.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { ITerminalInstance, Direction, ITerminalGroup, ITerminalService, ITermin
1313
import { ViewContainerLocation, IViewDescriptorService } from 'vs/workbench/common/views';
1414
import { IShellLaunchConfig, ITerminalTabLayoutInfoById } from 'vs/platform/terminal/common/terminal';
1515
import { TerminalStatus } from 'vs/workbench/contrib/terminal/browser/terminalStatusList';
16+
import { getPartByLocation } from 'vs/workbench/browser/parts/views/viewsService';
1617

1718
const SPLIT_PANE_MIN_SIZE = 120;
1819

@@ -49,7 +50,7 @@ class SplitPaneContainer extends Disposable {
4950
this._addChild(instance, index);
5051
}
5152

52-
resizePane(index: number, direction: Direction, amount: number): void {
53+
resizePane(index: number, direction: Direction, amount: number, part: Parts): void {
5354
const isHorizontal = (direction === Direction.Left) || (direction === Direction.Right);
5455

5556
if ((isHorizontal && this.orientation !== Orientation.HORIZONTAL) ||
@@ -59,7 +60,8 @@ class SplitPaneContainer extends Disposable {
5960
(this.orientation === Orientation.VERTICAL && direction === Direction.Right)) {
6061
amount *= -1;
6162
}
62-
this._layoutService.resizePart(Parts.PANEL_PART, amount, amount);
63+
64+
this._layoutService.resizePart(part, amount, amount);
6365
return;
6466
}
6567

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

0 commit comments

Comments
 (0)