From patchwork Thu Jul 4 17:02:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 33540 Received: (qmail 104607 invoked by alias); 4 Jul 2019 17:03:21 -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 104540 invoked by uid 89); 4 Jul 2019 17:03:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.46.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Jul 2019 17:03:18 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 0C28F26690 for ; Thu, 4 Jul 2019 12:03:15 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id j58dhUspBYTGMj58dhNfqy; Thu, 04 Jul 2019 12:03:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qHkPh9ingceXGl53IuvmzVBT2IqBsVfnSdRiDhg52/o=; b=ifI5C9oJzC9MNMXoe+yAQ/OtY1 CtqGkOygo8Wlr6fpF51YQYOkgE0sGrYPSauRAlGkqm9pNbfSdPl5xKrymaOifxRrQ87P7I1wdCKFm hzrmQa5LFFLpKcPg1TCIihLo5; Received: from 174-29-58-150.hlrn.qwest.net ([174.29.58.150]:34690 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hj58c-002sAP-Qk; Thu, 04 Jul 2019 12:03:14 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 02/61] Check can_highlight in tui_check_and_display_highlight_if_needed Date: Thu, 4 Jul 2019 11:02:12 -0600 Message-Id: <20190704170311.15982-3-tom@tromey.com> In-Reply-To: <20190704170311.15982-1-tom@tromey.com> References: <20190704170311.15982-1-tom@tromey.com> tui_check_and_display_highlight_if_needed currently checks the window's type; but this can be replaced with a check of "can_highlight", making it more polymorphically-correct. 2019-07-04 Tom Tromey * tui/tui-wingeneral.c (tui_check_and_display_highlight_if_needed): Check can_highlight. --- gdb/ChangeLog | 5 +++++ gdb/tui/tui-wingeneral.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index cf8d9fc3959..c15739c594b 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -128,7 +128,7 @@ tui_highlight_win (struct tui_win_info *win_info) void tui_check_and_display_highlight_if_needed (struct tui_win_info *win_info) { - if (win_info != NULL && win_info->type != CMD_WIN) + if (win_info != NULL && win_info->can_highlight) { if (win_info->is_highlighted) tui_highlight_win (win_info);