浏览代码

Fixes Console.WindowHeight detection when HeightSize.BufferHeight is set.

BDisp 4 年之前
父节点
当前提交
a7c2847256
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 1
      Terminal.Gui/ConsoleDrivers/NetDriver.cs
  2. 1 0
      UICatalog/Scenarios/CharacterMap.cs

+ 4 - 1
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -534,6 +534,7 @@ namespace Terminal.Gui {
 			}
 		}
 
+		int lastWindowHeight;
 		void WaitWinChange ()
 		{
 			while (true) {
@@ -545,8 +546,10 @@ namespace Terminal.Gui {
 					break;
 				case HeightSize.BufferHeight:
 					if (Console.BufferWidth != consoleDriver.Cols || Console.BufferHeight != consoleDriver.Rows
-						|| Console.WindowTop != consoleDriver.Top) {
+						|| Console.WindowTop != consoleDriver.Top
+						|| Console.WindowHeight != lastWindowHeight) {
 						newTop = Console.WindowTop;
+						lastWindowHeight = Console.WindowHeight;
 						return;
 					}
 					break;

+ 1 - 0
UICatalog/Scenarios/CharacterMap.cs

@@ -74,6 +74,7 @@ namespace UICatalog {
 			Win.Add (jumpList);
 
 			jumpList.Refresh ();
+			jumpList.SetFocus ();
 		}
 
 		public override void Run ()