Kaynağa Gözat

Remove EnableConsoleScrolling

Tigger Kindel 2 yıl önce
ebeveyn
işleme
7ef51bad85

+ 3 - 5
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -20,12 +20,10 @@ namespace Terminal.Gui {
 		public override int Rows => Curses.Lines;
 		public override int Rows => Curses.Lines;
 		public override int Left => 0;
 		public override int Left => 0;
 		public override int Top => 0;
 		public override int Top => 0;
+		[Obsolete ("This API is deprecated", false)]
 		public override bool EnableConsoleScrolling { get; set; }
 		public override bool EnableConsoleScrolling { get; set; }
-		[Obsolete ("This API is deprecated; use EnableConsoleScrolling instead.", false)]
-		public override bool HeightAsBuffer {
-			get => EnableConsoleScrolling;
-			set => EnableConsoleScrolling = value;
-		}
+		[Obsolete ("This API is deprecated", false)]
+		public override bool HeightAsBuffer { get; set; }
 		public override IClipboard Clipboard { get => clipboard; }
 		public override IClipboard Clipboard { get => clipboard; }
 
 
 		CursorVisibility? initialCursorVisibility = null;
 		CursorVisibility? initialCursorVisibility = null;

+ 18 - 38
Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs

@@ -45,12 +45,10 @@ namespace Terminal.Gui {
 		// Only handling left here because not all terminals has a horizontal scroll bar.
 		// Only handling left here because not all terminals has a horizontal scroll bar.
 		public override int Left => 0;
 		public override int Left => 0;
 		public override int Top => 0;
 		public override int Top => 0;
+		[Obsolete ("This API is deprecated", false)]
 		public override bool EnableConsoleScrolling { get; set; }
 		public override bool EnableConsoleScrolling { get; set; }
-		[Obsolete ("This API is deprecated; use EnableConsoleScrolling instead.", false)]
-		public override bool HeightAsBuffer {
-			get => EnableConsoleScrolling;
-			set => EnableConsoleScrolling = value;
-		}
+		[Obsolete ("This API is deprecated", false)]
+		public override bool HeightAsBuffer { get; set; }
 		private IClipboard clipboard = null;
 		private IClipboard clipboard = null;
 		public override IClipboard Clipboard => clipboard;
 		public override IClipboard Clipboard => clipboard;
 
 
@@ -537,31 +535,24 @@ namespace Terminal.Gui {
 			FakeConsole.SetBufferSize (width, height);
 			FakeConsole.SetBufferSize (width, height);
 			cols = width;
 			cols = width;
 			rows = height;
 			rows = height;
-			if (!EnableConsoleScrolling) {
-				SetWindowSize (width, height);
-			}
+			SetWindowSize (width, height);
 			ProcessResize ();
 			ProcessResize ();
 		}
 		}
 
 
 		public void SetWindowSize (int width, int height)
 		public void SetWindowSize (int width, int height)
 		{
 		{
 			FakeConsole.SetWindowSize (width, height);
 			FakeConsole.SetWindowSize (width, height);
-			if (!EnableConsoleScrolling) {
-				if (width != cols || height != rows) {
-					SetBufferSize (width, height);
-					cols = width;
-					rows = height;
-				}
+			if (width != cols || height != rows) {
+				SetBufferSize (width, height);
+				cols = width;
+				rows = height;
 			}
 			}
 			ProcessResize ();
 			ProcessResize ();
 		}
 		}
 
 
 		public void SetWindowPosition (int left, int top)
 		public void SetWindowPosition (int left, int top)
 		{
 		{
-			if (EnableConsoleScrolling) {
-				this.left = Math.Max (Math.Min (left, Cols - FakeConsole.WindowWidth), 0);
-				this.top = Math.Max (Math.Min (top, Rows - FakeConsole.WindowHeight), 0);
-			} else if (this.left > 0 || this.top > 0) {
+			if (this.left > 0 || this.top > 0) {
 				this.left = 0;
 				this.left = 0;
 				this.top = 0;
 				this.top = 0;
 			}
 			}
@@ -577,29 +568,18 @@ namespace Terminal.Gui {
 
 
 		public override void ResizeScreen ()
 		public override void ResizeScreen ()
 		{
 		{
-			if (!EnableConsoleScrolling) {
-				if (FakeConsole.WindowHeight > 0) {
-					// Can raise an exception while is still resizing.
-					try {
-#pragma warning disable CA1416
-						FakeConsole.CursorTop = 0;
-						FakeConsole.CursorLeft = 0;
-						FakeConsole.WindowTop = 0;
-						FakeConsole.WindowLeft = 0;
-#pragma warning restore CA1416
-					} catch (System.IO.IOException) {
-						return;
-					} catch (ArgumentOutOfRangeException) {
-						return;
-					}
-				}
-			} else {
+			if (FakeConsole.WindowHeight > 0) {
+				// Can raise an exception while is still resizing.
 				try {
 				try {
 #pragma warning disable CA1416
 #pragma warning disable CA1416
-					FakeConsole.WindowLeft = Math.Max (Math.Min (left, Cols - FakeConsole.WindowWidth), 0);
-					FakeConsole.WindowTop = Math.Max (Math.Min (top, Rows - FakeConsole.WindowHeight), 0);
+					FakeConsole.CursorTop = 0;
+					FakeConsole.CursorLeft = 0;
+					FakeConsole.WindowTop = 0;
+					FakeConsole.WindowLeft = 0;
 #pragma warning restore CA1416
 #pragma warning restore CA1416
-				} catch (Exception) {
+				} catch (System.IO.IOException) {
+					return;
+				} catch (ArgumentOutOfRangeException) {
 					return;
 					return;
 				}
 				}
 			}
 			}

+ 29 - 98
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -113,7 +113,6 @@ namespace Terminal.Gui {
 		ConsoleDriver consoleDriver;
 		ConsoleDriver consoleDriver;
 		volatile ConsoleKeyInfo [] cki = null;
 		volatile ConsoleKeyInfo [] cki = null;
 		static volatile bool isEscSeq;
 		static volatile bool isEscSeq;
-		int lastWindowHeight;
 		bool stopTasks;
 		bool stopTasks;
 #if PROCESS_REQUEST
 #if PROCESS_REQUEST
 		bool neededProcessRequest;
 		bool neededProcessRequest;
@@ -251,21 +250,11 @@ namespace Terminal.Gui {
 
 
 		bool IsWinChanged (int winHeight, int winWidth, int buffHeight, int buffWidth)
 		bool IsWinChanged (int winHeight, int winWidth, int buffHeight, int buffWidth)
 		{
 		{
-			if (!consoleDriver.EnableConsoleScrolling) {
-				if (winWidth != consoleDriver.Cols || winHeight != consoleDriver.Rows) {
-					var w = Math.Max (winWidth, 0);
-					var h = Math.Max (winHeight, 0);
-					GetWindowSizeEvent (new Size (w, h));
-					return true;
-				}
-			} else {
-				if (winWidth != consoleDriver.Cols || winHeight != lastWindowHeight
-					|| buffWidth != consoleDriver.Cols || buffHeight != consoleDriver.Rows) {
-
-					lastWindowHeight = Math.Max (winHeight, 0);
-					GetWindowSizeEvent (new Size (winWidth, lastWindowHeight));
-					return true;
-				}
+			if (winWidth != consoleDriver.Cols || winHeight != consoleDriver.Rows) {
+				var w = Math.Max (winWidth, 0);
+				var h = Math.Max (winHeight, 0);
+				GetWindowSizeEvent (new Size (w, h));
+				return true;
 			}
 			}
 			return false;
 			return false;
 		}
 		}
@@ -584,20 +573,15 @@ namespace Terminal.Gui {
 		public override int Rows => rows;
 		public override int Rows => rows;
 		public override int Left => left;
 		public override int Left => left;
 		public override int Top => top;
 		public override int Top => top;
+		[Obsolete ("This API is deprecated", false)]
 		public override bool EnableConsoleScrolling { get; set; }
 		public override bool EnableConsoleScrolling { get; set; }
-		[Obsolete ("This API is deprecated; use EnableConsoleScrolling instead.", false)]
-		public override bool HeightAsBuffer {
-			get => EnableConsoleScrolling;
-			set => EnableConsoleScrolling = value;
-		}
-
+		[Obsolete ("This API is deprecated", false)]
+		public override bool HeightAsBuffer { get; set; }
 		public NetWinVTConsole NetWinConsole { get; }
 		public NetWinVTConsole NetWinConsole { get; }
 		public bool IsWinPlatform { get; }
 		public bool IsWinPlatform { get; }
 		public override IClipboard Clipboard { get; }
 		public override IClipboard Clipboard { get; }
 		public override int [,,] Contents => contents;
 		public override int [,,] Contents => contents;
 
 
-		int largestBufferHeight;
-
 		public NetDriver ()
 		public NetDriver ()
 		{
 		{
 			var p = Environment.OSVersion.Platform;
 			var p = Environment.OSVersion.Platform;
@@ -752,14 +736,8 @@ namespace Terminal.Gui {
 
 
 			Console.TreatControlCAsInput = true;
 			Console.TreatControlCAsInput = true;
 
 
-			if (EnableConsoleScrolling) {
-				largestBufferHeight = Console.BufferHeight;
-			} else {
-				largestBufferHeight = Console.WindowHeight;
-			}
-
 			cols = Console.WindowWidth;
 			cols = Console.WindowWidth;
-			rows = largestBufferHeight;
+			rows = Console.WindowHeight; 
 
 
 			CurrentAttribute = MakeColor (Color.White, Color.Black);
 			CurrentAttribute = MakeColor (Color.White, Color.Black);
 			InitalizeColorSchemes ();
 			InitalizeColorSchemes ();
@@ -775,54 +753,31 @@ namespace Terminal.Gui {
 
 
 		public override void ResizeScreen ()
 		public override void ResizeScreen ()
 		{
 		{
-			if (!EnableConsoleScrolling) {
-				if (Console.WindowHeight > 0) {
-					// Not supported on Unix.
-					if (IsWinPlatform) {
-						// Can raise an exception while is still resizing.
-						try {
-#pragma warning disable CA1416
-							Console.CursorTop = 0;
-							Console.CursorLeft = 0;
-							Console.WindowTop = 0;
-							Console.WindowLeft = 0;
-							if (Console.WindowHeight > Rows) {
-								Console.SetWindowSize (Cols, Rows);
-							}
-							Console.SetBufferSize (Cols, Rows);
-#pragma warning restore CA1416
-						} catch (System.IO.IOException) {
-							setClip ();
-						} catch (ArgumentOutOfRangeException) {
-							setClip ();
-						}
-					} else {
-						Console.Out.Write ($"\x1b[8;{Rows};{Cols}t");
-					}
-				}
-			} else {
+			if (Console.WindowHeight > 0) {
+				// Not supported on Unix.
 				if (IsWinPlatform) {
 				if (IsWinPlatform) {
-					if (Console.WindowHeight > 0) {
-						// Can raise an exception while is still resizing.
-						try {
+					// Can raise an exception while is still resizing.
+					try {
 #pragma warning disable CA1416
 #pragma warning disable CA1416
-							Console.CursorTop = 0;
-							Console.CursorLeft = 0;
-							if (Console.WindowHeight > Rows) {
-								Console.SetWindowSize (Cols, Rows);
-							}
-							Console.SetBufferSize (Cols, Rows);
-#pragma warning restore CA1416
-						} catch (System.IO.IOException) {
-							setClip ();
-						} catch (ArgumentOutOfRangeException) {
-							setClip ();
+						Console.CursorTop = 0;
+						Console.CursorLeft = 0;
+						Console.WindowTop = 0;
+						Console.WindowLeft = 0;
+						if (Console.WindowHeight > Rows) {
+							Console.SetWindowSize (Cols, Rows);
 						}
 						}
+						Console.SetBufferSize (Cols, Rows);
+#pragma warning restore CA1416
+					} catch (System.IO.IOException) {
+						setClip ();
+					} catch (ArgumentOutOfRangeException) {
+						setClip ();
 					}
 					}
 				} else {
 				} else {
-					Console.Out.Write ($"\x1b[30;{Rows};{Cols}t");
+					Console.Out.Write ($"\x1b[8;{Rows};{Cols}t");
 				}
 				}
 			}
 			}
+
 			setClip ();
 			setClip ();
 
 
 			void setClip ()
 			void setClip ()
@@ -864,9 +819,7 @@ namespace Terminal.Gui {
 
 
 		public override void UpdateScreen ()
 		public override void UpdateScreen ()
 		{
 		{
-			if (winChanging || Console.WindowHeight < 1 || contents.Length != Rows * Cols * 3
-				|| (!EnableConsoleScrolling && Rows != Console.WindowHeight)
-				|| (EnableConsoleScrolling && Rows != largestBufferHeight)) {
+			if (winChanging || Console.WindowHeight < 1 || contents.Length != Rows * Cols * 3 || Rows != Console.WindowHeight) {
 				return;
 				return;
 			}
 			}
 
 
@@ -1021,23 +974,6 @@ namespace Terminal.Gui {
 
 
 		private void SetWindowPosition (int col, int row)
 		private void SetWindowPosition (int col, int row)
 		{
 		{
-			if (IsWinPlatform && EnableConsoleScrolling) {
-				var winTop = Math.Max (Rows - Console.WindowHeight - row, 0);
-				winTop = Math.Min (winTop, Rows - Console.WindowHeight + 1);
-				winTop = Math.Max (winTop, 0);
-				if (winTop != Console.WindowTop) {
-					try {
-						if (!EnsureBufferSize ()) {
-							return;
-						}
-#pragma warning disable CA1416
-						Console.SetWindowPosition (col, winTop);
-#pragma warning restore CA1416
-					} catch (System.IO.IOException) {
-
-					} catch (System.ArgumentOutOfRangeException) { }
-				}
-			}
 			top = Console.WindowTop;
 			top = Console.WindowTop;
 			left = Console.WindowLeft;
 			left = Console.WindowLeft;
 		}
 		}
@@ -1287,15 +1223,10 @@ namespace Terminal.Gui {
 		void ChangeWin (Size size)
 		void ChangeWin (Size size)
 		{
 		{
 			winChanging = true;
 			winChanging = true;
-			if (!EnableConsoleScrolling) {
-				largestBufferHeight = Math.Max (size.Height, 0);
-			} else {
-				largestBufferHeight = Math.Max (size.Height, largestBufferHeight);
-			}
 			top = 0;
 			top = 0;
 			left = 0;
 			left = 0;
 			cols = size.Width;
 			cols = size.Width;
-			rows = largestBufferHeight;
+			rows = Math.Max (size.Height, 0); 
 			ResizeScreen ();
 			ResizeScreen ();
 			UpdateOffScreen ();
 			UpdateOffScreen ();
 			winChanging = false;
 			winChanging = false;

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

@@ -714,12 +714,10 @@ namespace Terminal.Gui {
 		public override int Rows => rows;
 		public override int Rows => rows;
 		public override int Left => left;
 		public override int Left => left;
 		public override int Top => top;
 		public override int Top => top;
+		[Obsolete ("This API is deprecated", false)]
 		public override bool EnableConsoleScrolling { get; set; }
 		public override bool EnableConsoleScrolling { get; set; }
-		[Obsolete ("This API is deprecated; use EnableConsoleScrolling instead.", false)]
-		public override bool HeightAsBuffer {
-			get => EnableConsoleScrolling;
-			set => EnableConsoleScrolling = value;
-		}
+		[Obsolete ("This API is deprecated", false)]
+		public override bool HeightAsBuffer { get; set; }
 		public override IClipboard Clipboard => clipboard;
 		public override IClipboard Clipboard => clipboard;
 		public override int [,,] Contents => contents;
 		public override int [,,] Contents => contents;
 
 

+ 6 - 25
Terminal.Gui/Core/Application.cs

@@ -111,8 +111,6 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		public static View WantContinuousButtonPressedView { get; private set; }
 		public static View WantContinuousButtonPressedView { get; private set; }
 
 
-		private static bool? _enableConsoleScrolling;
-
 		/// <summary>
 		/// <summary>
 		/// The current <see cref="ConsoleDriver.EnableConsoleScrolling"/> used in the terminal.
 		/// The current <see cref="ConsoleDriver.EnableConsoleScrolling"/> used in the terminal.
 		/// </summary>
 		/// </summary>
@@ -128,32 +126,17 @@ namespace Terminal.Gui {
 		/// In this case console scrolling is enabled and the contents (<see cref="ConsoleDriver.Rows"/> high) will scroll
 		/// In this case console scrolling is enabled and the contents (<see cref="ConsoleDriver.Rows"/> high) will scroll
 		/// as the console scrolls. 
 		/// as the console scrolls. 
 		/// </para>
 		/// </para>
-		/// This API was previously named 'HeightAsBuffer` but was renamed to make its purpose more clear.
+		/// <para>This API is deprecated and has no impact when enabled.</para>
+		/// <para>This API was previously named 'HeightAsBuffer` but was renamed to make its purpose more clear.</para>
 		/// </remarks>
 		/// </remarks>
-		public static bool EnableConsoleScrolling {
-			get {
-				if (Driver == null) {
-					return _enableConsoleScrolling.HasValue && _enableConsoleScrolling.Value;
-				}
-				return Driver.EnableConsoleScrolling;
-			}
-			set {
-				_enableConsoleScrolling = value;
-				if (Driver == null) {
-					return;
-				}
-				Driver.EnableConsoleScrolling = value;
-			}
-		}
+		[Obsolete ("This API is deprecated and has no impact when enabled.", false)]
+		public static bool EnableConsoleScrolling { get; set; }
 
 
 		/// <summary>
 		/// <summary>
 		/// This API is deprecated; use <see cref="EnableConsoleScrolling"/> instead.
 		/// This API is deprecated; use <see cref="EnableConsoleScrolling"/> instead.
 		/// </summary>
 		/// </summary>
-		[Obsolete ("This API is deprecated; use EnableConsoleScrolling instead.", false)]
-		public static bool HeightAsBuffer {
-			get => EnableConsoleScrolling;
-			set => EnableConsoleScrolling = value;
-		}
+		[Obsolete ("This API is deprecated and has no impact when enabled.", false)]
+		public static bool HeightAsBuffer { get; set; }
 
 
 		static Key alternateForwardKey = Key.PageDown | Key.CtrlMask;
 		static Key alternateForwardKey = Key.PageDown | Key.CtrlMask;
 
 
@@ -449,7 +432,6 @@ namespace Terminal.Gui {
 			MainLoop = new MainLoop (mainLoopDriver);
 			MainLoop = new MainLoop (mainLoopDriver);
 
 
 			try {
 			try {
-				Driver.EnableConsoleScrolling = EnableConsoleScrolling;
 				Driver.Init (TerminalResized);
 				Driver.Init (TerminalResized);
 			} catch (InvalidOperationException ex) {
 			} catch (InvalidOperationException ex) {
 				// This is a case where the driver is unable to initialize the console.
 				// This is a case where the driver is unable to initialize the console.
@@ -1125,7 +1107,6 @@ namespace Terminal.Gui {
 			NotifyStopRunState = null;
 			NotifyStopRunState = null;
 			_initialized = false;
 			_initialized = false;
 			mouseGrabView = null;
 			mouseGrabView = null;
-			_enableConsoleScrolling = false;
 
 
 			// Reset synchronization context to allow the user to run async/await,
 			// Reset synchronization context to allow the user to run async/await,
 			// as the main loop has been ended, the synchronization context from 
 			// as the main loop has been ended, the synchronization context from 

+ 5 - 5
Terminal.Gui/Core/ConsoleDriver.cs

@@ -696,16 +696,16 @@ namespace Terminal.Gui {
 		/// </para>
 		/// </para>
 		/// </summary>
 		/// </summary>
 		/// <remarks>
 		/// <remarks>
-		/// NOTE: This functionaliy is currently broken on Windows Terminal.
+		/// NOTE: Changes to Windows Terminal prevents this functionality from working. It only really worked on Windows 'conhost' previously.
 		/// </remarks>
 		/// </remarks>
+		[Obsolete ("This API is deprecated and has no impact when enabled.", false)]
 		public abstract bool EnableConsoleScrolling { get; set; }
 		public abstract bool EnableConsoleScrolling { get; set; }
-
 		/// <summary>
 		/// <summary>
-		/// This API is deprecated; use <see cref="EnableConsoleScrolling"/> instead.
+		/// This API is deprecated and has no impact when enabled.
 		/// </summary>
 		/// </summary>
-		[Obsolete ("This API is deprecated; use EnableConsoleScrolling instead.", false)]
+		[Obsolete ("This API is deprecated and has no impact when enabled.", false)]
 		public abstract bool HeightAsBuffer { get; set; }
 		public abstract bool HeightAsBuffer { get; set; }
-
+		
 		/// <summary>
 		/// <summary>
 		/// The format is rows, columns and 3 values on the last column: Rune, Attribute and Dirty Flag
 		/// The format is rows, columns and 3 values on the last column: Rune, Attribute and Dirty Flag
 		/// </summary>
 		/// </summary>

+ 0 - 22
UICatalog/UICatalog.cs

@@ -121,8 +121,6 @@ namespace UICatalog {
 			// a Scenario was selected. Otherwise, the user wants to exit UI Catalog.
 			// a Scenario was selected. Otherwise, the user wants to exit UI Catalog.
 			Application.Init ();
 			Application.Init ();
 			
 			
-			Application.EnableConsoleScrolling = _enableConsoleScrolling;
-			
 			Application.Run<UICatalogTopLevel> ();
 			Application.Run<UICatalogTopLevel> ();
 			Application.Shutdown ();
 			Application.Shutdown ();
 
 
@@ -144,7 +142,6 @@ namespace UICatalog {
 
 
 		static bool _useSystemConsole = false;
 		static bool _useSystemConsole = false;
 		static ConsoleDriver.DiagnosticFlags _diagnosticFlags;
 		static ConsoleDriver.DiagnosticFlags _diagnosticFlags;
-		static bool _enableConsoleScrolling = false;
 		static bool _isFirstRunning = true;
 		static bool _isFirstRunning = true;
 		static ColorScheme _colorScheme;
 		static ColorScheme _colorScheme;
 
 
@@ -154,7 +151,6 @@ namespace UICatalog {
 		/// </summary>
 		/// </summary>
 		class UICatalogTopLevel : Toplevel {
 		class UICatalogTopLevel : Toplevel {
 			public MenuItem miIsMouseDisabled;
 			public MenuItem miIsMouseDisabled;
-			public MenuItem miEnableConsoleScrolling;
 
 
 			public FrameView LeftPane;
 			public FrameView LeftPane;
 			public ListView CategoryListView;
 			public ListView CategoryListView;
@@ -282,7 +278,6 @@ namespace UICatalog {
 				}
 				}
 
 
 				miIsMouseDisabled.Checked = Application.IsMouseDisabled;
 				miIsMouseDisabled.Checked = Application.IsMouseDisabled;
-				miEnableConsoleScrolling.Checked = Application.EnableConsoleScrolling;
 				DriverName.Title = $"Driver: {Driver.GetType ().Name}";
 				DriverName.Title = $"Driver: {Driver.GetType ().Name}";
 				OS.Title = $"OS: {Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.OperatingSystem} {Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.OperatingSystemVersion}";
 				OS.Title = $"OS: {Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.OperatingSystem} {Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.OperatingSystemVersion}";
 
 
@@ -319,7 +314,6 @@ namespace UICatalog {
 				List<MenuItem []> menuItems = new List<MenuItem []> ();
 				List<MenuItem []> menuItems = new List<MenuItem []> ();
 				menuItems.Add (CreateDiagnosticFlagsMenuItems ());
 				menuItems.Add (CreateDiagnosticFlagsMenuItems ());
 				menuItems.Add (new MenuItem [] { null });
 				menuItems.Add (new MenuItem [] { null });
-				menuItems.Add (CreateEnableConsoleScrollingMenuItems ());
 				menuItems.Add (CreateDisabledEnabledMouseItems ());
 				menuItems.Add (CreateDisabledEnabledMouseItems ());
 				menuItems.Add (CreateKeybindingsMenuItems ());
 				menuItems.Add (CreateKeybindingsMenuItems ());
 				return menuItems;
 				return menuItems;
@@ -357,22 +351,6 @@ namespace UICatalog {
 				return menuItems.ToArray ();
 				return menuItems.ToArray ();
 			}
 			}
 
 
-			MenuItem [] CreateEnableConsoleScrollingMenuItems ()
-			{
-				List<MenuItem> menuItems = new List<MenuItem> ();
-				miEnableConsoleScrolling = new MenuItem ();
-				miEnableConsoleScrolling.Title = "_Enable Console Scrolling";
-				miEnableConsoleScrolling.Shortcut = Key.CtrlMask | Key.AltMask | (Key)miEnableConsoleScrolling.Title.ToString ().Substring (1, 1) [0];
-				miEnableConsoleScrolling.CheckType |= MenuItemCheckStyle.Checked;
-				miEnableConsoleScrolling.Action += () => {
-					miEnableConsoleScrolling.Checked = !miEnableConsoleScrolling.Checked;
-					Application.EnableConsoleScrolling = miEnableConsoleScrolling.Checked;
-				};
-				menuItems.Add (miEnableConsoleScrolling);
-
-				return menuItems.ToArray ();
-			}
-
 			MenuItem [] CreateDiagnosticFlagsMenuItems ()
 			MenuItem [] CreateDiagnosticFlagsMenuItems ()
 			{
 			{
 				const string OFF = "Diagnostics: _Off";
 				const string OFF = "Diagnostics: _Off";

+ 0 - 2
UnitTests/Application/ApplicationTests.cs

@@ -24,7 +24,6 @@ namespace Terminal.Gui.ApplicationTests {
 			Assert.Null (Application.Driver);
 			Assert.Null (Application.Driver);
 			Assert.Null (Application.Top);
 			Assert.Null (Application.Top);
 			Assert.Null (Application.Current);
 			Assert.Null (Application.Current);
-			Assert.False (Application.EnableConsoleScrolling);
 			Assert.Null (Application.MainLoop);
 			Assert.Null (Application.MainLoop);
 			Assert.Null (Application.Iteration);
 			Assert.Null (Application.Iteration);
 			Assert.Null (Application.RootMouseEvent);
 			Assert.Null (Application.RootMouseEvent);
@@ -36,7 +35,6 @@ namespace Terminal.Gui.ApplicationTests {
 			Assert.NotNull (Application.Driver);
 			Assert.NotNull (Application.Driver);
 			Assert.NotNull (Application.Top);
 			Assert.NotNull (Application.Top);
 			Assert.NotNull (Application.Current);
 			Assert.NotNull (Application.Current);
-			Assert.False (Application.EnableConsoleScrolling);
 			Assert.NotNull (Application.MainLoop);
 			Assert.NotNull (Application.MainLoop);
 			Assert.Null (Application.Iteration);
 			Assert.Null (Application.Iteration);
 			Assert.Null (Application.RootMouseEvent);
 			Assert.Null (Application.RootMouseEvent);

+ 2 - 132
UnitTests/Drivers/ConsoleDriverTests.cs

@@ -169,29 +169,16 @@ namespace Terminal.Gui.DriverTests {
 			Assert.Equal (40, Application.Driver.Rows);
 			Assert.Equal (40, Application.Driver.Rows);
 			Assert.True (wasTerminalResized);
 			Assert.True (wasTerminalResized);
 
 
-			// MockDriver will still be 120x40
-			wasTerminalResized = false;
-			Application.EnableConsoleScrolling = true;
-			driver.SetWindowSize (40, 20);
-			Assert.Equal (120, Application.Driver.Cols);
-			Assert.Equal (40, Application.Driver.Rows);
-			Assert.Equal (120, Console.BufferWidth);
-			Assert.Equal (40, Console.BufferHeight);
-			Assert.Equal (40, Console.WindowWidth);
-			Assert.Equal (20, Console.WindowHeight);
-			Assert.True (wasTerminalResized);
-
 			Application.Shutdown ();
 			Application.Shutdown ();
 		}
 		}
 
 
 		[Theory]
 		[Theory]
 		[InlineData (typeof (FakeDriver))]
 		[InlineData (typeof (FakeDriver))]
-		public void EnableConsoleScrolling_Is_False_Left_And_Top_Is_Always_Zero (Type driverType)
+		public void Left_And_Top_Is_Always_Zero (Type driverType)
 		{
 		{
 			var driver = (FakeDriver)Activator.CreateInstance (driverType);
 			var driver = (FakeDriver)Activator.CreateInstance (driverType);
 			Application.Init (driver);
 			Application.Init (driver);
 
 
-			Assert.False (Application.EnableConsoleScrolling);
 			Assert.Equal (0, Console.WindowLeft);
 			Assert.Equal (0, Console.WindowLeft);
 			Assert.Equal (0, Console.WindowTop);
 			Assert.Equal (0, Console.WindowTop);
 
 
@@ -201,124 +188,7 @@ namespace Terminal.Gui.DriverTests {
 
 
 			Application.Shutdown ();
 			Application.Shutdown ();
 		}
 		}
-
-		[Theory]
-		[InlineData (typeof (FakeDriver))]
-		public void EnableConsoleScrolling_Is_True_Left_Cannot_Be_Greater_Than_WindowWidth (Type driverType)
-		{
-			var driver = (FakeDriver)Activator.CreateInstance (driverType);
-			Application.Init (driver);
-
-			Application.EnableConsoleScrolling = true;
-			Assert.True (Application.EnableConsoleScrolling);
-
-			driver.SetWindowPosition (81, 25);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (0, Console.WindowTop);
-
-			Application.Shutdown ();
-		}
-
-		[Theory]
-		[InlineData (typeof (FakeDriver))]
-		public void EnableConsoleScrolling_Is_True_Left_Cannot_Be_Greater_Than_BufferWidth_Minus_WindowWidth (Type driverType)
-		{
-			var driver = (FakeDriver)Activator.CreateInstance (driverType);
-			Application.Init (driver);
-
-			Application.EnableConsoleScrolling = true;
-			Assert.True (Application.EnableConsoleScrolling);
-
-			driver.SetWindowPosition (81, 25);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (0, Console.WindowTop);
-
-			// MockDriver will now be sets to 120x25
-			driver.SetBufferSize (120, 25);
-			Assert.Equal (120, Application.Driver.Cols);
-			Assert.Equal (25, Application.Driver.Rows);
-			Assert.Equal (120, Console.BufferWidth);
-			Assert.Equal (25, Console.BufferHeight);
-			Assert.Equal (80, Console.WindowWidth);
-			Assert.Equal (25, Console.WindowHeight);
-			driver.SetWindowPosition (121, 25);
-			Assert.Equal (40, Console.WindowLeft);
-			Assert.Equal (0, Console.WindowTop);
-
-			driver.SetWindowSize (90, 25);
-			Assert.Equal (120, Application.Driver.Cols);
-			Assert.Equal (25, Application.Driver.Rows);
-			Assert.Equal (120, Console.BufferWidth);
-			Assert.Equal (25, Console.BufferHeight);
-			Assert.Equal (90, Console.WindowWidth);
-			Assert.Equal (25, Console.WindowHeight);
-			driver.SetWindowPosition (121, 25);
-			Assert.Equal (30, Console.WindowLeft);
-			Assert.Equal (0, Console.WindowTop);
-
-			Application.Shutdown ();
-		}
-
-		[Theory]
-		[InlineData (typeof (FakeDriver))]
-		public void EnableConsoleScrolling_Is_True_Top_Cannot_Be_Greater_Than_WindowHeight (Type driverType)
-		{
-			var driver = (FakeDriver)Activator.CreateInstance (driverType);
-			Application.Init (driver);
-
-			Application.EnableConsoleScrolling = true;
-			Assert.True (Application.EnableConsoleScrolling);
-
-			driver.SetWindowPosition (80, 26);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (0, Console.WindowTop);
-
-			Application.Shutdown ();
-		}
-
-		[Theory]
-		[InlineData (typeof (FakeDriver))]
-		public void EnableConsoleScrolling_Is_True_Top_Cannot_Be_Greater_Than_BufferHeight_Minus_WindowHeight (Type driverType)
-		{
-			var driver = (FakeDriver)Activator.CreateInstance (driverType);
-			Application.Init (driver);
-
-			Application.EnableConsoleScrolling = true;
-			Assert.True (Application.EnableConsoleScrolling);
-
-			driver.SetWindowPosition (80, 26);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (0, Console.WindowTop);
-
-			// MockDriver will now be sets to 80x40
-			driver.SetBufferSize (80, 40);
-			Assert.Equal (80, Application.Driver.Cols);
-			Assert.Equal (40, Application.Driver.Rows);
-			Assert.Equal (80, Console.BufferWidth);
-			Assert.Equal (40, Console.BufferHeight);
-			Assert.Equal (80, Console.WindowWidth);
-			Assert.Equal (25, Console.WindowHeight);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (0, Console.WindowTop);
-			driver.SetWindowPosition (80, 40);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (15, Console.WindowTop);
-
-			driver.SetWindowSize (80, 20);
-			Assert.Equal (80, Application.Driver.Cols);
-			Assert.Equal (40, Application.Driver.Rows);
-			Assert.Equal (80, Console.BufferWidth);
-			Assert.Equal (40, Console.BufferHeight);
-			Assert.Equal (80, Console.WindowWidth);
-			Assert.Equal (20, Console.WindowHeight);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (15, Console.WindowTop);
-			driver.SetWindowPosition (80, 41);
-			Assert.Equal (0, Console.WindowLeft);
-			Assert.Equal (20, Console.WindowTop);
-
-			Application.Shutdown ();
-		}
+		
 		
 		
 		[Fact, AutoInitShutdown]
 		[Fact, AutoInitShutdown]
 		public void AddRune_On_Clip_Left_Or_Right_Replace_Previous_Or_Next_Wide_Rune_With_Space ()
 		public void AddRune_On_Clip_Left_Or_Right_Replace_Previous_Or_Next_Wide_Rune_With_Space ()

+ 1 - 1
UnitTests/xunit.runner.json

@@ -2,5 +2,5 @@
   "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
   "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
   "parallelizeTestCollections": false,
   "parallelizeTestCollections": false,
   "parallelizeAssembly": false,
   "parallelizeAssembly": false,
-  "stopOnFail": false
+  "stopOnFail": true
 }
 }