[PATCH 0/1] Fix cursor position restoration on console

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/1] Fix cursor position restoration on console

Takashi Yano
In cygwin test release 3.1.0-0.1, the cursor position is not restored
correctly after screen alternation 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.

Takashi Yano (1):
  Cygwin: console: Fix cursor position restore after screen alternation.

 winsup/cygwin/fhandler_console.cc | 3 +++
 1 file changed, 3 insertions(+)

--
2.21.0

Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1] Cygwin: console: Fix cursor position restore after screen alternation.

Takashi Yano
- 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

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 0/1] Fix cursor position restoration on console

Corinna Vinschen-2
In reply to this post by Takashi Yano
On Aug 12 22:48, Takashi Yano wrote:

> In cygwin test release 3.1.0-0.1, the cursor position is not restored
> correctly after screen alternation 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.
>
> Takashi Yano (1):
>   Cygwin: console: Fix cursor position restore after screen alternation.
>
>  winsup/cygwin/fhandler_console.cc | 3 +++
>  1 file changed, 3 insertions(+)
>
> --
> 2.21.0
Pushed.


Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer

signature.asc (849 bytes) Download Attachment