Re-highlight windows when needed during TUI startup
authorTom Tromey <tom@tromey.com>
Sun, 10 Nov 2019 16:11:42 +0000 (09:11 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 1 Dec 2019 18:59:24 +0000 (11:59 -0700)
I noticed that "tui enable" did not correctly show the source window
as having the focus.  Debugging showed that the problem was that
tui_update_variables was called after the windows were drawn, and its
result was being ignored.  This changed the code to re-highlight the
windows if the value changed.

gdb/ChangeLog
2019-12-01  Tom Tromey  <tom@tromey.com>

* tui/tui.c (tui_enable): Call tui_update_variables earlier.

Change-Id: I1a4563fb431833dd3211a224c9e2df3b936fe9ce

gdb/ChangeLog
gdb/tui/tui.c

index 86fa84065bbdc3097a89c009f2dd807be65ad998..67b76dc2ef9027f9abd60720b26482f086144836 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-01  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui.c (tui_enable): Call tui_update_variables earlier.
+
 2019-12-01  Tom Tromey  <tom@tromey.com>
 
        * NEWS: Document new settings.
index 3f5ab415de9ce02801d460998bf7ab741013b072..dc0d22fd66dae4c9e20b65453d2c36fcab20d999 100644 (file)
@@ -496,8 +496,9 @@ tui_enable (void)
   tui_install_hooks ();
   rl_startup_hook = tui_rl_startup_hook;
 
-  tui_update_variables ();
-  
+  if (tui_update_variables ())
+    tui_rehighlight_all ();
+
   tui_setup_io (1);
 
   tui_active = 1;
This page took 0.032414 seconds and 4 git commands to generate.