From 22fb1cfbe7b0b3003613c7aaa5a6e65756fcf765 Mon Sep 17 00:00:00 2001 From: SteVen Batten <6561887+sbatten@users.noreply.github.com> Date: Wed, 9 Feb 2022 07:35:30 -0800 Subject: [PATCH] refs #142176 (#142423) --- src/vs/workbench/browser/layout.ts | 2 +- src/vs/workbench/browser/parts/views/viewsService.ts | 2 +- .../workbench/contrib/terminal/browser/terminalGroup.ts | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index acebcd3e9f43a..35158adb130e4 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -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); diff --git a/src/vs/workbench/browser/parts/views/viewsService.ts b/src/vs/workbench/browser/parts/views/viewsService.ts index 18a44dd6076ec..e9e01d6c5b2e3 100644 --- a/src/vs/workbench/browser/parts/views/viewsService.ts +++ b/src/vs/workbench/browser/parts/views/viewsService.ts @@ -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; diff --git a/src/vs/workbench/contrib/terminal/browser/terminalGroup.ts b/src/vs/workbench/contrib/terminal/browser/terminalGroup.ts index 7343055fec93d..4a6d2c182e14b 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalGroup.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalGroup.ts @@ -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; @@ -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) || @@ -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; } @@ -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)); } }