From patchwork Sun Nov 10 16:40:39 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: 35773 Received: (qmail 99445 invoked by alias); 10 Nov 2019 16:40:47 -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 99437 invoked by uid 89); 10 Nov 2019 16:40:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1803, border, HContent-Transfer-Encoding:8bit 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; Sun, 10 Nov 2019 16:40:45 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id D615E20D4D; Sun, 10 Nov 2019 11:40:42 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 0958820413 for ; Sun, 10 Nov 2019 11:40:40 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id E5BFD20AF6 for ; Sun, 10 Nov 2019 11:40:39 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Sun, 10 Nov 2019 11:40:39 -0500 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] Re-highlight windows when needed during TUI startup X-Gerrit-Change-Id: I1a4563fb431833dd3211a224c9e2df3b936fe9ce X-Gerrit-Change-Number: 607 X-Gerrit-ChangeURL: X-Gerrit-Commit: 8e24b9cb21f2103c7c7182805040e7f43c40594a References: Reply-To: tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-76-gf8b6da0ab5 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-10 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 7ea57bc..b5e0284 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2019-11-10 Tom Tromey + * tui/tui.c (tui_enable): Call tui_update_variables earlier. + +2019-11-10 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 1568351..1724b2b 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -494,8 +494,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;