This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH 1/1] Cygwin: console: Fix cursor position restore after screen alternation.
- From: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- To: cygwin-patches at cygwin dot com
- Cc: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- Date: Mon, 12 Aug 2019 22:48:45 +0900
- Subject: [PATCH 1/1] Cygwin: console: Fix cursor position restore after screen alternation.
- Dkim-filter: OpenDKIM Filter v2.10.3 conuserg-05.nifty.com x7CDmj22022710
- References: <20190812134845.2249-1-takashi.yano@nifty.ne.jp>
- 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.
---
winsup/cygwin/fhandler_console.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index e3656a33a..075593523 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -304,6 +304,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)
{
--
2.21.0