From: Andrew Burgess Date: Sat, 8 Feb 2025 21:32:05 +0000 (+0000) Subject: gdb/tui: remove unnecessary wmove call from tui_status_window X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5ac7c9f7c97d2c1f7e9a44b66451e598774e547;p=thirdparty%2Fbinutils-gdb.git gdb/tui: remove unnecessary wmove call from tui_status_window 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 --- diff --git a/gdb/tui/tui-status.c b/gdb/tui/tui-status.c index 52394157611..d76c2db78e8 100644 --- a/gdb/tui/tui-status.c +++ b/gdb/tui/tui-status.c @@ -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