]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove one call to can_box from TUI
authorTom Tromey <tom@tromey.com>
Fri, 31 May 2024 20:02:54 +0000 (14:02 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 3 Jun 2024 17:22:53 +0000 (11:22 -0600)
This removes a call to can_box from
tui_source_window_base::show_source_content.  can_box will always
return true here.

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/tui/tui-winsource.c

index 61c8e00589db40cffd1d937aa43f766524a45925..e68efadcf1858498e3637f9e6f495cb8702ae302 100644 (file)
@@ -406,15 +406,9 @@ tui_source_window_base::show_source_content ()
   for (int lineno = 0; lineno < m_content.size (); lineno++)
     show_source_line (lineno);
 
-  if (can_box ())
-    {
-      /* Calling check_and_display_highlight_if_needed will call refresh_window
-        (so long as the current window can be boxed), which will ensure that
-        the newly loaded window content is copied to the screen.  */
-      check_and_display_highlight_if_needed ();
-    }
-  else
-    refresh_window ();
+  /* Calling check_and_display_highlight_if_needed will call
+     refresh_window.  */
+  check_and_display_highlight_if_needed ();
 }
 
 tui_source_window_base::tui_source_window_base ()