public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Move scrollok call in register window
@ 2024-02-08 19:33 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-02-08 19:33 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=074b58b4dcbc395633f3bcfa1e4c990e0d942e8e
commit 074b58b4dcbc395633f3bcfa1e4c990e0d942e8e
Author: Tom Tromey <tom@tromey.com>
Date: Sun Dec 17 09:31:05 2023 -0700
Move scrollok call in register window
The register window calls scrollok each time a register is written to
the window. However, we only need to call this once, at the start of
display. (We could actually call it just once when the window is
made, but that would involve making another method virtual or adding a
new member -- both which I think are worse than this approach.)
Tested-By: Tom de Vries <tdevries@suse.de>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diff:
---
gdb/tui/tui-regs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 12301552c34..eeea03f87c1 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -236,6 +236,10 @@ tui_data_window::update_register_data (const reggroup *group,
void
tui_data_window::display_registers_from (int start_element_no)
{
+ /* In case the regs window is not boxed, we'll write the last char in the
+ last line here, causing a scroll, so prevent that. */
+ scrollok (handle.get (), FALSE);
+
int max_len = 0;
for (auto &&data_item_win : m_regs_content)
{
@@ -448,10 +452,6 @@ tui_data_window::check_register_values (frame_info_ptr frame)
void
tui_register_info::rerender (WINDOW *handle, int field_width)
{
- /* In case the regs window is not boxed, we'll write the last char in the
- last line here, causing a scroll, so prevent that. */
- scrollok (handle, FALSE);
-
if (highlight)
/* We ignore the return value, casting it to void in order to avoid
a compiler warning. The warning itself was introduced by a patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-08 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 19:33 [binutils-gdb] Move scrollok call in register window Tom Tromey
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).