From patchwork Fri Nov 22 23:54:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36150 Received: (qmail 129654 invoked by alias); 22 Nov 2019 23:54:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 129586 invoked by uid 89); 22 Nov 2019 23:54:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=drawn, HX-Languages-Length:1808 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Nov 2019 23:54:21 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id CCADB20250; Fri, 22 Nov 2019 18:54:17 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id 0072320641 for ; Fri, 22 Nov 2019 18:54:15 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id DD76328172 for ; Fri, 22 Nov 2019 18:54:14 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Fri, 22 Nov 2019 18:54:13 -0500 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: newpatchset Subject: [review v2] Re-highlight windows when needed during TUI startup X-Gerrit-Change-Id: I1a4563fb431833dd3211a224c9e2df3b936fe9ce X-Gerrit-Change-Number: 607 X-Gerrit-ChangeURL: X-Gerrit-Commit: f6d1ddf481181ff6e36bd3aed0da34c9012a6853 In-Reply-To: References: Reply-To: tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191122235414.DD76328172@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 * 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 + * tui/tui.c (tui_enable): Call tui_update_variables earlier. + +2019-11-22 Tom Tromey + * 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;