+2020-10-19 Tom Tromey <tromey@adacore.com>
+
+ PR tui/26719
+ * tui/tui-winsource.h (struct tui_source_window_base)
+ <refresh_window>: Rename from refresh_pad.
+ * tui/tui-winsource.c (tui_source_window_base::refresh_window):
+ Rename from refresh_pad.
+ (tui_source_window_base::show_source_content)
+ (tui_source_window_base::do_scroll_horizontal): Update.
+
2020-10-19 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* thread.c (_initialize_thread): Fine-tune the help text of
+2020-10-19 Tom Tromey <tromey@adacore.com>
+
+ PR tui/26719
+ * gdb.tui/list.exp: Check source window contents after focus
+ change.
+
2020-10-17 Tom de Vries <tdevries@suse.de>
PR symtab/26317
# to ensure that GDB has a valid idea of what is currently focused.
Term::command "focus next"
Term::check_contents "focus next" "Focus set to cmd window"
+# PR tui/26719 - switching focus would clear the source window.
+Term::check_contents "source is still visible" "21 *return 0"
/* See tui-winsource.h. */
void
-tui_source_window_base::refresh_pad ()
+tui_source_window_base::refresh_window ()
{
+ tui_win_info::refresh_window ();
+
int pad_width = std::max (m_max_length, width);
int left_margin = 1 + TUI_EXECINFO_SIZE + extra_margin ();
int view_width = width - left_margin - 1;
for (int lineno = 0; lineno < m_content.size (); lineno++)
show_source_line (lineno);
- refresh_pad ();
-
refresh_window ();
}
if (offset < 0)
offset = 0;
m_horizontal_offset = offset;
- refresh_pad ();
+ refresh_window ();
}
}
/* Erase the source content. */
virtual void erase_source_content () = 0;
+ void refresh_window () override;
+
/* Return the start address and gdbarch. */
virtual void display_start_addr (struct gdbarch **gdbarch_p,
CORE_ADDR *addr_p) = 0;
void show_source_content ();
- /* Re-display the pad in the window. */
- void refresh_pad ();
-
/* Called when the user "set style enabled" setting is changed. */
void style_changed ();