public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: console: Fix cursor position restore after screen alternation.
@ 2019-08-12 15:14 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-08-12 15:14 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d178de278a7a8c73f5c8c8b61def5e13e07ece2c
commit d178de278a7a8c73f5c8c8b61def5e13e07ece2c
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Mon Aug 12 22:48:45 2019 +0900
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.
Diff:
---
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 b46a4d5..4afb7ef 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -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)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-12 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 15:14 [newlib-cygwin] Cygwin: console: Fix cursor position restore after screen alternation Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).