Explorar o código

Fixes #2793. Windows Terminal still show vertical scroll bar using WindowsDriver.

BDisp hai 1 ano
pai
achega
8752fd53d9
Modificáronse 1 ficheiros con 4 adicións e 5 borrados
  1. 4 5
      Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

+ 4 - 5
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -1454,13 +1454,13 @@ internal class WindowsDriver : ConsoleDriver {
 		if (RunningUnitTests) {
 		if (RunningUnitTests) {
 			return;
 			return;
 		}
 		}
-		
+
 		try {
 		try {
 			if (WinConsole != null) {
 			if (WinConsole != null) {
 				var winSize = WinConsole.GetConsoleOutputWindow (out Point pos);
 				var winSize = WinConsole.GetConsoleOutputWindow (out Point pos);
 				Cols = winSize.Width;
 				Cols = winSize.Width;
 				Rows = winSize.Height;
 				Rows = winSize.Height;
-			} 
+			}
 			WindowsConsole.SmallRect.MakeEmpty (ref _damageRegion);
 			WindowsConsole.SmallRect.MakeEmpty (ref _damageRegion);
 
 
 			// Needed for Windows Terminal
 			// Needed for Windows Terminal
@@ -1511,8 +1511,7 @@ internal class WindowsDriver : ConsoleDriver {
 
 
 		WinConsole?.ForceRefreshCursorVisibility ();
 		WinConsole?.ForceRefreshCursorVisibility ();
 	}
 	}
-	
-	
+
 	public override void UpdateScreen ()
 	public override void UpdateScreen ()
 	{
 	{
 		var windowSize = WinConsole?.GetConsoleBufferWindow (out _) ?? new Size (Cols, Rows);
 		var windowSize = WinConsole?.GetConsoleBufferWindow (out _) ?? new Size (Cols, Rows);
@@ -1711,7 +1710,7 @@ internal class WindowsDriver : ConsoleDriver {
 
 
 		if (!RunningUnitTests && _isWindowsTerminal) {
 		if (!RunningUnitTests && _isWindowsTerminal) {
 			// Disable alternative screen buffer.
 			// Disable alternative screen buffer.
-			Console.Out.Write (EscSeqUtils.CSI_RestoreAltBufferWithBackscroll);
+			Console.Out.Write (EscSeqUtils.CSI_RestoreCursorAndActivateAltBufferWithBackscroll);
 		}
 		}
 	}
 	}