]> Git Repo - binutils.git/commitdiff
Don't call erase_data_content from tui_data_window::show_registers
authorTom Tromey <[email protected]>
Tue, 1 Oct 2019 23:42:17 +0000 (17:42 -0600)
committerTom Tromey <[email protected]>
Wed, 9 Oct 2019 22:50:36 +0000 (16:50 -0600)
tui_data_window::show_registers currently calls erase_data_content.
However, I think it's better to have fewer calls to this (ideally just
one would suffice).  This refactors that function to remove this call.

gdb/ChangeLog
2019-10-09  Tom Tromey  <[email protected]>

* tui/tui-regs.c (tui_data_window::show_registers): Don't call
erase_data_content.

gdb/ChangeLog
gdb/tui/tui-regs.c

index bca7b7b4ffc3249fee4259e3692c184d811d2a62..a5504a9c00babe02d951646eaff5d912939df8a6 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-09  Tom Tromey  <[email protected]>
+
+       * tui/tui-regs.c (tui_data_window::show_registers): Don't call
+       erase_data_content.
+
 2019-10-09  Tom Tromey  <[email protected]>
 
        * tui/tui-wingeneral.h (tui_delete_win): Don't declare.
index 474b62e20476bd19317929ac56e051f7b2d75304..1d936f712b6e95406cfca45e60d0f93b0ddd6676 100644 (file)
@@ -154,13 +154,14 @@ tui_data_window::show_registers (struct reggroup *group)
       for (auto &&data_item_win : m_regs_content)
        data_item_win.highlight = false;
       m_current_group = group;
-      rerender ();
     }
   else
     {
       m_current_group = 0;
-      erase_data_content (_("[ Register Values Unavailable ]"));
+      m_regs_content.clear ();
     }
+
+  rerender ();
 }
 
 
This page took 0.052736 seconds and 4 git commands to generate.