From efaeeabd6b0f1d85c899417fb158ac4e09690969 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 5 Mar 2018 10:22:01 -0800 Subject: [PATCH] Only reset terminal layout when orientation changes Fixes #45074 --- .../parts/terminal/electron-browser/terminalTab.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts index cc31945959f..569d67778ba 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts @@ -419,14 +419,18 @@ export class TerminalTab extends Disposable implements ITerminalTab { if (this._splitPaneContainer) { // Check if the panel position changed and rotate panes if so const newPanelPosition = this._partService.getPanelPosition(); - if (newPanelPosition !== this._panelPosition) { + const panelPositionChanged = newPanelPosition !== this._panelPosition; + if (panelPositionChanged) { const newOrientation = newPanelPosition === Position.BOTTOM ? Orientation.HORIZONTAL : Orientation.VERTICAL; this._splitPaneContainer.setOrientation(newOrientation); this._panelPosition = newPanelPosition; } this._splitPaneContainer.layout(width, height); - this._splitPaneContainer.resetSize(); + + if (panelPositionChanged) { + this._splitPaneContainer.resetSize(); + } } } -- GitLab