public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Tom Tromey (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: gdb-patches@sourceware.org
Subject: [review v2] Re-highlight windows when needed during TUI startup
Date: Fri, 22 Nov 2019 23:54:00 -0000	[thread overview]
Message-ID: <20191122235414.DD76328172@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1573404038000.I1a4563fb431833dd3211a224c9e2df3b936fe9ce@gnutoolchain-gerrit.osci.io>

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/607
......................................................................

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-11-22  Tom Tromey  <tom@tromey.com>

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

Change-Id: I1a4563fb431833dd3211a224c9e2df3b936fe9ce
---
M gdb/ChangeLog
M gdb/tui/tui.c
2 files changed, 7 insertions(+), 2 deletions(-)



diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6aed748..89233ac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2019-11-22  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui.c (tui_enable): Call tui_update_variables earlier.
+
+2019-11-22  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_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;

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I1a4563fb431833dd3211a224c9e2df3b936fe9ce
Gerrit-Change-Number: 607
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset

  reply	other threads:[~2019-11-22 23:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10 16:40 [review] " Tom Tromey (Code Review)
2019-11-22 23:54 ` Tom Tromey (Code Review) [this message]
2019-12-01 19:04 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-01 19:04 ` Sourceware to Gerrit sync (Code Review)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122235414.DD76328172@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).