From 7d99f14ac0bf0ed5da22b6a292800a056676ecab Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 16 Feb 2018 12:30:37 -0800 Subject: [PATCH] Support vertical resize commands --- .../parts/terminal/electron-browser/terminalTab.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts index cf697159f04..2bffb957e9a 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalTab.ts @@ -71,11 +71,15 @@ class SplitPaneContainer { } // Remove size from right pane, unless index is the last pane in which case use left pane - const isSizingRightPane = index !== this._children.length - 1; - const indexToChange = isSizingRightPane ? index + 1 : index - 1; - if (isSizingRightPane && direction === Direction.Left) { + const isSizingEndPane = index !== this._children.length - 1; + const indexToChange = isSizingEndPane ? index + 1 : index - 1; + if (isSizingEndPane && direction === Direction.Left) { amount *= -1; - } else if (!isSizingRightPane && direction === Direction.Right) { + } else if (!isSizingEndPane && direction === Direction.Right) { + amount *= -1; + } else if (isSizingEndPane && direction === Direction.Up) { + amount *= -1; + } else if (!isSizingEndPane && direction === Direction.Down) { amount *= -1; } sizes[index] += amount;