This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch tymux-10-quiet-head
in repository terminology.
View the commit online.
commit 51e0d8b397ea2ce61b132e39a26b7a2492b07ba7
Author: Cedric BAIL <[email protected]>
AuthorDate: Fri Nov 20 17:21:40 2026 -0600
termptyesc: blank the line that IND and NEL scroll in
IND and NEL at the bottom margin scrolled the region without clearing
the row that came in, since f5cad4ff ("only clear cells when scrolling
to add text"). That row is the old top line, so it came back as the
new bottom line, text, attributes and autowrapped flag included:
"top", ESC [ 24;1 H, ESC D, "X" showed "Xop" at the bottom. In a
scroll region the last row of the region kept a copy of the row above.
Both control functions move the active position down one line and
scroll when it is on the bottom margin, which leaves a blank line
there, in the current background colour, as xterm does:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html (ESC D, ESC E)
and the VT510 Programmer Reference Manual (IND, NEL).
No existing checksum changes. The new test fails without the fix.
---
src/bin/termptyesc.c | 4 ++--
tests/ind_nel_blank_line.sh | 15 +++++++++++++++
tests/tests.results | 1 +
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 402974e5..0aea32b3 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -6504,14 +6504,14 @@ _handle_esc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
DBG("move to next line");
ty->cursor_state.wrapnext = 0;
ty->cursor_state.cy++;
- termpty_text_scroll_test(ty, EINA_FALSE);
+ termpty_text_scroll_test(ty, EINA_TRUE);
return 1;
case 'E': // NEL
DBG("NEL");
ty->cursor_state.wrapnext = 0;
_cursor_to_start_of_line(ty);
ty->cursor_state.cy++;
- termpty_text_scroll_test(ty, EINA_FALSE);
+ termpty_text_scroll_test(ty, EINA_TRUE);
return 1;
case 'Z': // same a 'ESC [ Pn c'
_term_txt_write(ty, "\033[?1;2C");
diff --git a/tests/ind_nel_blank_line.sh b/tests/ind_nel_blank_line.sh
new file mode 100755
index 00000000..b816773a
--- /dev/null
+++ b/tests/ind_nel_blank_line.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# IND and NEL at the bottom margin scroll up: the line that comes in is
+# blank, it is not a copy of a line that was already there.
+#
+# on the whole screen the old top line goes to the backlog
+printf '\033c\033[2J\033[Htop1\033[24;1H\033DX'
+printf '\033[H\033[2Jtop2\033[24;1H\033EY'
+# in a scroll region
+printf '\033[5;10r'
+printf '\033[5;1Hr5\033[6;1Hr6\033[7;1Hr7\033[8;1Hr8\033[9;1Hr9'
+printf '\033[10;1Hr10\033[10;1H\033D\033[10;1HA'
+printf '\033[10;1H\033E\033[10;1HB'
+# and the blank line takes the current background colour
+printf '\033[r\033[44m\033[24;1H\033D\033[0m'
diff --git a/tests/tests.results b/tests/tests.results
index edec78a5..e1baa737 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -248,3 +248,4 @@ kitty-kbd-altscreen.sh df9913f9d85f856c75dd525a806da4f6
kitty-kbd-reset.sh bd10ee95b6b71d150fbe1a11c7b6ac94
kitty-kbd-unsupported.sh 63cfb663085848fd972e9ba667a2901b
kitty-kbd-malformed.sh 70f115545d4cda821177c842c2f96a7f
+ind_nel_blank_line.sh 0824297732e75e03e7c37de4efd225a5
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.