aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-11-10 09:11:42 -0700
committerTom Tromey <tom@tromey.com>2019-12-01 11:59:24 -0700
commit484c9b643c206edf636d15aad1cf618e515350b7 (patch)
treeb3921f76a96be3b505556611a82031de641f6233 /gdb/tui
parenta2a7af0c33869f08a999d5d1b301017138cbeb7a (diff)
downloadgdb-484c9b643c206edf636d15aad1cf618e515350b7.zip
gdb-484c9b643c206edf636d15aad1cf618e515350b7.tar.gz
gdb-484c9b643c206edf636d15aad1cf618e515350b7.tar.bz2
Re-highlight windows when needed during TUI startup
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
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 3f5ab41..dc0d22f 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -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;