Cygwin: console: Fix cursor position restore after screen alternation.

- If screen is alternated on console, cursor position is not restored
  correctly in the case of xterm compatible mode is enabled. For example,
  the shell prompt is shown at incorrect position after using vim.
  This patch fixes this problem.
This commit is contained in:
Takashi Yano 2019-08-12 22:48:45 +09:00 committed by Corinna Vinschen
parent 33a21904a7
commit d178de278a

View File

@ -308,6 +308,9 @@ void
fhandler_console::set_cursor_maybe ()
{
con.fillin (get_output_handle ());
/* Nothing to do for xterm compatible mode. */
if (wincap.has_con_24bit_colors ())
return;
if (con.dwLastCursorPosition.X != con.b.dwCursorPosition.X ||
con.dwLastCursorPosition.Y != con.b.dwCursorPosition.Y)
{