Skip to content

Commit

Permalink
Brough in code from PR gui-cs#2264 (but commented)
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed May 10, 2023
1 parent 679bfff commit b4fa712
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Buffers;
using System.ComponentModel.Design.Serialization;
using Unix.Terminal;

namespace Terminal.Gui;

Expand Down Expand Up @@ -1561,7 +1558,7 @@ public override void Init (Action terminalResized)
// ESC [ ? 1048 l Restore cursor position
// ESC [ ? 1049 h Save cursor position and activate xterm alternative buffer (no backscroll)
// ESC [ ? 1049 l Restore cursor position and restore xterm working buffer (with backscroll)
// Per Issue #2264 using the alterantive screen buffer is required for Windows Terminal to not
// Per Issue #2264 using the alternative screen buffer is required for Windows Terminal to not
// wipe out the backscroll buffer when the application exits.
Console.Out.Write ("\x1b[?1047h");

Expand Down Expand Up @@ -1606,6 +1603,7 @@ public virtual void ResizeScreen ()
// If n is 3, clear entire screen and delete all lines saved in the scrollback buffer
// DO NOT USE 3J - even with the alternate screen buffer, it clears the entire scrollback buffer
Console.Out.Write ("\x1b[3J");
//Console.Out.Write ("\x1b[0J");
}
}

Expand Down

0 comments on commit b4fa712

Please sign in to comment.