public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Re-highlight windows when needed during TUI startup
@ 2019-12-01 19:03 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-12-01 19:03 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=484c9b643c206edf636d15aad1cf618e515350b7
commit 484c9b643c206edf636d15aad1cf618e515350b7
Author: Tom Tromey <tom@tromey.com>
Date: Sun Nov 10 09:11:42 2019 -0700
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
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/tui/tui.c | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 86fa840..67b76dc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
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.
* tui/tui-wingeneral.c (box_win): Apply appropriate border style.
* tui/tui-win.c (_initialize_tui_win): Add border style
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-12-01 19:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01 19:03 [binutils-gdb] Re-highlight windows when needed during TUI startup Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).