From 54d2ecf1301b57cf949a23af8aa28ca09dd65ec4 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 3 Aug 2022 19:14:16 +0100 Subject: [PATCH] Fixes #1934. WindowsDriver crash when the height is less than 1 with the VS Debugger Console. (#1935) --- Terminal.Gui/ConsoleDrivers/WindowsDriver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs index 7af9a6f9b..2f5813739 100644 --- a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs @@ -771,7 +771,7 @@ namespace Terminal.Gui { w += 3; } var newSize = WinConsole.SetConsoleWindow ( - (short)Math.Max (w, 16), (short)e.Height); + (short)Math.Max (w, 16), (short)Math.Max (e.Height, 1)); left = 0; top = 0; cols = newSize.Width;