]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/tui: remove unnecessary wmove call from tui_status_window
authorAndrew Burgess <aburgess@redhat.com>
Sat, 8 Feb 2025 21:32:05 +0000 (21:32 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 10 Feb 2025 20:57:12 +0000 (20:57 +0000)
I've been looking recently at when the TUI calls wnoutrefresh vs
wrefresh, and the ordering of other screen update actions relative to
these calls.

I noticed in tui_status_window::rerender() a call to wmove() that is
placed after the refresh_window() call.  This surely means that the
cursor is moved, but, this update is not sent to the screen.

But we call wmove() at the start of tui_status_window::rerender()
before anything is sent to the screen, so the final wmove() call is
pointless as far as I can tell.

I propose removing it.  This is trivial, but removing pointless work
like this slowly makes the TUI code easier to understand.

There should be no user visible changes after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/tui/tui-status.c

index 5239415761189f1856b2db2885223700c7f48b6c..d76c2db78e89007a86baf59745af69482d7a1d6b 100644 (file)
@@ -253,8 +253,8 @@ tui_status_window::rerender ()
   waddstr (handle.get (), string.c_str ());
   wclrtoeol (handle.get ());
   (void) wstandend (handle.get ());
+
   refresh_window ();
-  wmove (handle.get (), 0, 0);
 }
 
 /* Function to print the frame information for the TUI.  The windows