From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 2/3] [gdb/testsuite] Fix "FIXME scroll" error in Term::_insert
Date: Fri, 16 Oct 2026 13:31:22 +0200 [thread overview]
Message-ID: <20261016113123.6460-3-tdevries@suse.de> (raw)
In-Reply-To: <20261016113123.6460-1-tdevries@suse.de>
Use Term::_scroll in Term::_insert to fix the error "FIXME scroll".
At the point that tuiterm was added, it had two of those, one in
Term::_ctl_0x0a and one in Term::_insert.
The one in Term::_ctl_0x0a was fixed by commit efe1b6507b7 ("gdb/testsuite:
fix line feed scrolling in tuiterm.exp").
We're essentially reusing that code to fix Term::_insert as well.
The scrolling affected by this patch is scrolling after wrapping. This commit
implements ANSI wrapping behaviour. Wrapping in xterm requires support for
the newline glitch. There's an issue open about this [1].
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=30451
---
gdb/testsuite/gdb.tui/tuiterm.exp | 12 ++++++++++--
gdb/testsuite/lib/tuiterm.exp | 5 +----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.tui/tuiterm.exp b/gdb/testsuite/gdb.tui/tuiterm.exp
index 4966800c0bb..75bd205d51e 100644
--- a/gdb/testsuite/gdb.tui/tuiterm.exp
+++ b/gdb/testsuite/gdb.tui/tuiterm.exp
@@ -81,8 +81,7 @@ set small_initial {
# yz01234
#
# The bottom right cell is left blank: trying to write to it using _insert
-# would move the cursor past the screen, causing a scroll, but scrolling is
-# not implemented at the moment.
+# would move the cursor past the screen, causing a scroll.
proc setup_small {} {
setup_terminal 8 4
@@ -594,6 +593,15 @@ proc test_repeat { } {
"qrstuvwx"
"yz01234 "
} 5 1
+
+ Term::_move_cursor 7 3
+ Term::_csi_b 1
+ check "repeat at bottom-right corner" {
+ "xxXXXnop"
+ "qrstuvwx"
+ "yz01234X"
+ " "
+ } 0 3
}
proc test_vertical_line_position_absolute { } {
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index 39fcb082b47..9d29549fdce 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -922,7 +922,6 @@ proc Term::_insert {str} {
variable _cur_col
variable _cur_row
- variable _rows
variable _cols
variable _attrs
variable _chars
@@ -934,9 +933,7 @@ proc Term::_insert {str} {
if {$_cur_col >= $_cols} {
set _cur_col 0
incr _cur_row
- if {$_cur_row >= $_rows} {
- error "FIXME scroll"
- }
+ _scroll
}
}
}
--
2.51.0
next prev parent reply other threads:[~2026-10-16 11:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 11:31 [pushed 0/3] " Tom de Vries
2026-10-16 11:31 ` [pushed 1/3] [gdb/testsuite] Factor out Term::_scroll Tom de Vries
2026-10-16 11:31 ` Tom de Vries [this message]
2026-10-16 11:31 ` [pushed 3/3] [gdb/testsuite] Add gdb.tui/scroll-bottom-right.exp Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261016113123.6460-3-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox