Browse Source

isWinPlatform was written twice.

BDisp 4 years ago
parent
commit
934c0b9629
1 changed files with 5 additions and 7 deletions
  1. 5 7
      Terminal.Gui/ConsoleDrivers/NetDriver.cs

+ 5 - 7
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -191,13 +191,11 @@ namespace Terminal.Gui {
 				break;
 			case HeightSize.BufferHeight:
 				if (isWinPlatform && Console.WindowHeight > 0) {
-					if (isWinPlatform) {
-						// Can raise an exception while is still resizing.
-						try {
-							Console.WindowTop = Math.Max (Math.Min (top, Console.BufferHeight - Console.WindowHeight), 0);
-						} catch (Exception) {
-							return;
-						}
+					// Can raise an exception while is still resizing.
+					try {
+						Console.WindowTop = Math.Max (Math.Min (top, Console.BufferHeight - Console.WindowHeight), 0);
+					} catch (Exception) {
+						return;
 					}
 				} else {
 					Console.Out.Write ($"\x1b[{top};{Console.WindowLeft}" +