winpty/misc
Ryan Prichard d4640890cf Rewrite resize logic, introduce "direct mode", and tweak scroll scraping.
* Unfreeze the console while changing the buffer size.  Changing the
   buffer size hangs conhost.exe.  See:
    - https://github.com/rprichard/winpty/issues/31
    - https://wpdev.uservoice.com/forums/266908-command-prompt/suggestions/9941292-conhost-exe-hangs-in-win10-if-setconsolescreenbuff

 * Detect buffer size changes and switch to a "direct mode".  Direct mode
   makes no attempt to track incremental console changes.  Instead, the
   content of the current console window is printed.  This mode is
   intended for full-screen apps that resize the console.

 * Reopen CONOUT$, which detects apps that change the active screen buffer.
   Fixes https://github.com/rprichard/winpty/issues/34.

 * In the scroll scraping (scrollingScrapeOutput), consider a line changed
   if the new content is truncated relative to the content previously
   output.  Previously, we only compared against the line-buffer up to the
   current console width.  e.g.

   If this:
      |C:\Program|

   turns into:
      |C:\Prog|
      |ram    |

   we previously left |C:\Program| in the line-buffer for the first line
   and did not re-output the first line.

   We *should* reoutput the first line at this point so that, if the line
   scrolls upward, and the terminal is later expanded, we will have
   output an "Erase in Line" CSI command to clear the obscured "ram" text.

   We need to update the line-buffer for the sake of Windows 10 combined
   with terminals like xterm and putty.  On such a terminal, if the
   terminal later widened, Windows 10 will restore the console to the
   first state.  At that point, we need to reoutput the line, because
   xterm and putty do not save and restore truncated line content extending
   past the current terminal width.
2015-09-29 02:32:49 -05:00
..
.gitignore Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
BufferResizeTests.cc Rewrite resize logic, introduce "direct mode", and tweak scroll scraping. 2015-09-29 02:32:49 -05:00
build_win32.sh Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
ChangeScreenBuffer.cc Rewrite resize logic, introduce "direct mode", and tweak scroll scraping. 2015-09-29 02:32:49 -05:00
ClearConsole.cc Add a test program demonstrating how to clear (part of) the console buffer. 2015-08-23 23:13:20 -05:00
DebugClient.py Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
DebugServer.py Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
DumpLines.py Rewrite resize logic, introduce "direct mode", and tweak scroll scraping. 2015-09-29 02:32:49 -05:00
FormatChar.h Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
SelectAllTest.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
SetCursorPos.cc Rewrite resize logic, introduce "direct mode", and tweak scroll scraping. 2015-09-29 02:32:49 -05:00
ShowArgv.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
ShowConsoleInput.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Spew.py Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
TestUtil.cc Rewrite resize logic, introduce "direct mode", and tweak scroll scraping. 2015-09-29 02:32:49 -05:00
UnicodeTest1.cc Add a test program that writes and reads a non-ASCII character. 2015-09-23 17:38:12 -05:00
UnixEcho.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
VeryLargeRead.cc Allow col and row to be specified to VeryLargeRead.cc and add server OSs 2015-09-26 00:13:31 -05:00
VkEscapeTest.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Win10ResizeWhileFrozen.cc Expand on the Win10ResizeWhileFrozen comment. 2015-09-24 23:58:28 -07:00
Win10WrapTest1.cc Add a few more experiments 2015-08-22 20:56:24 -07:00
Win10WrapTest2.cc Rewrite resize logic, introduce "direct mode", and tweak scroll scraping. 2015-09-29 02:32:49 -05:00
Win32Echo1.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Win32Echo2.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Win32Test1.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Win32Test2.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Win32Test3.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00
Win32Write1.cc Rename Shared to shared and Misc to misc. 2012-04-01 02:13:21 -07:00