public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/cygwin-3_3-branch] Cygwin: console: Fix IL/DL escape sequence on the last line.
@ 2022-02-03 12:20 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2022-02-03 12:20 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=df0a643c6a069d9f4175a5aacabeee7c8fd54bef
commit df0a643c6a069d9f4175a5aacabeee7c8fd54bef
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Thu Feb 3 21:09:44 2022 +0900
Cygwin: console: Fix IL/DL escape sequence on the last line.
- Currently, escape sequence IL/DL (CSI Ps L, CSI Ps M) does not
work correctly at the last (bottom end) line. This patch fixes
the issue.
Addresses:
https://cygwin.com/pipermail/cygwin/2022-February/250736.html
Diff:
---
winsup/cygwin/fhandler_console.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index da1d2e80f..65325adeb 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -2174,6 +2174,12 @@ fhandler_console::char_command (char c)
cursor_get (&x, &y);
if (y < srTop || y > srBottom)
break;
+ if (y == con.b.srWindow.Bottom)
+ {
+ WriteConsoleW (get_output_handle (), L"\033[2K", 4, 0, 0);
+ wpbuf.empty ();
+ break;
+ }
if (y == con.b.srWindow.Top
&& srBottom == con.b.srWindow.Bottom)
{
@@ -2213,6 +2219,12 @@ fhandler_console::char_command (char c)
cursor_get (&x, &y);
if (y < srTop || y > srBottom)
break;
+ if (y == con.b.srWindow.Bottom)
+ {
+ WriteConsoleW (get_output_handle (), L"\033[2K", 4, 0, 0);
+ wpbuf.empty ();
+ break;
+ }
__small_swprintf (bufw, L"\033[%d;%dr",
y + 1 - con.b.srWindow.Top,
srBottom + 1 - con.b.srWindow.Top);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-03 12:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 12:20 [newlib-cygwin/cygwin-3_3-branch] Cygwin: console: Fix IL/DL escape sequence on the last line Takashi Yano
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).