diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-01-05 12:18:05 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-01-27 16:20:10 +0000 |
commit | d2a5ea5622ec7a2a3e255186c88d69812f148913 (patch) | |
tree | 54c68908396212c54b1b30e337fb3630f2f399ee /gdb/addrmap.c | |
parent | 6acafdaef76a4505b7cd87d7612d59dee4302f7d (diff) | |
download | gdb-d2a5ea5622ec7a2a3e255186c88d69812f148913.zip gdb-d2a5ea5622ec7a2a3e255186c88d69812f148913.tar.gz gdb-d2a5ea5622ec7a2a3e255186c88d69812f148913.tar.bz2 |
gdb/tui: avoid extra refresh_window on horizontal scroll
While working on the previous patches I noticed that in some cases I
was seeing two calls to tui_source_window_base::refresh_window when
scrolling the window horizontally.
The two calls would trigger in for the tui-disasm-long-lines.exp test
when the pad needed to be refilled. The two called both come from
tui_source_window_base::show_source_content. The first call is nested
within check_and_display_highlight_if_needed, while the second call is
done directly at the end of show_source_content.
The check_and_display_highlight_if_needed is being used to draw the
window box to the window, this is needed here because
show_source_content is what gets called when the window needs
updating, e.g. after a resize. We could potentially do the boxing in
refresh_window, but then we'd be doing it each time we scroll, even
though the box doesn't need changing in this case.
However, we can move the check_and_display_highlight_if_needed to be
the last thing done in show_source_content, this means that we can
rely on the refresh_window call within it to be our single refresh
call.
There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/addrmap.c')
0 files changed, 0 insertions, 0 deletions