diff --git a/ANSI.c b/ANSI.c index cd5473d..f81b5ae 100644 --- a/ANSI.c +++ b/ANSI.c @@ -152,8 +152,9 @@ remove wcstok, avoiding potential interference with the host; similarly, use a private heap instead of malloc. - v1.80, 26 October, 2017: - fix unloading. + v1.80, 26 to 28 October, 2017: + fix unloading; + revert back to (re)storing buffer cursor position. */ #include "ansicon.h" @@ -1076,16 +1077,12 @@ void InterpretEscSeq( void ) case 's': // ESC[s Saves cursor position for recall later if (es_argc != 0) return; - pState->SavePos.X = CUR.X; - pState->SavePos.Y = CUR.Y - TOP; - DEBUGSTR( 1, "SavePos = %u,%u; CUR = %u,%u; TOP = %u, .Top = %u", - pState->SavePos.X, pState->SavePos.Y, CUR.X, CUR.Y, TOP, Info.srWindow.Top ); + pState->SavePos = CUR; return; case 'u': // ESC[u Return to saved cursor position if (es_argc != 0) return; - Pos.X = pState->SavePos.X; - Pos.Y = pState->SavePos.Y + TOP; + Pos = pState->SavePos; if (Pos.X > RIGHT) Pos.X = RIGHT; if (Pos.Y > BOTTOM) Pos.Y = BOTTOM; SetConsoleCursorPosition( hConOut, Pos ); diff --git a/ansicon.c b/ansicon.c index 5af2592..83a5572 100644 --- a/ansicon.c +++ b/ansicon.c @@ -87,7 +87,7 @@ add error codes to some message. */ -#define PDATE L"26 October, 2017" +#define PDATE L"28 October, 2017" #include "ansicon.h" #include "version.h" diff --git a/readme.txt b/readme.txt index cb7741c..0af43bc 100644 --- a/readme.txt +++ b/readme.txt @@ -295,8 +295,9 @@ Version History Legend: + added, - bug-fixed, * changed. - 1.80 - 27 October, 2017: - - fix unloading. + 1.80 - 28 October, 2017: + - fix unloading; + * go back to saving the buffer cursor position. 1.72 - 24 December, 2015: - handle STD_OUTPUT_HANDLE & STD_ERROR_HANDLE in WriteFile; @@ -524,4 +525,4 @@ Distribution ============================= -Jason Hood, 27 October, 2017. +Jason Hood, 28 October, 2017.