From patchwork Sun Dec 1 19:04:09 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: 36403 Received: (qmail 71316 invoked by alias); 1 Dec 2019 19:04:25 -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 71244 invoked by uid 89); 1 Dec 2019 19:04:25 -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 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, 01 Dec 2019 19:04:23 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 53999204BA; Sun, 1 Dec 2019 14:04:20 -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 AA6E720A7F; Sun, 1 Dec 2019 14:04:09 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 8A69128174; Sun, 1 Dec 2019 14:04:09 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Sun, 1 Dec 2019 14:04:09 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Re-highlight windows when needed during TUI startup X-Gerrit-Change-Id: I1a4563fb431833dd3211a224c9e2df3b936fe9ce X-Gerrit-Change-Number: 607 X-Gerrit-ChangeURL: X-Gerrit-Commit: 484c9b643c206edf636d15aad1cf618e515350b7 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191201190409.8A69128174@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. 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-12-01 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 86fa840..67b76dc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2019-12-01 Tom Tromey + * tui/tui.c (tui_enable): Call tui_update_variables earlier. + +2019-12-01 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;