From patchwork Wed May 8 16:36:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32609 Received: (qmail 96721 invoked by alias); 8 May 2019 16:36:54 -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 96713 invoked by uid 89); 8 May 2019 16:36:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.2 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: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 May 2019 16:36:52 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway32.websitewelcome.com (Postfix) with ESMTP id C5CEC112363 for ; Wed, 8 May 2019 11:36:50 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id OPYohNT5g2PzOOPYohpPTz; Wed, 08 May 2019 11:36:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To: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=UktBUdj90GRhI4nZR/IBT30k+JMRwkwCX4Ni0ixjDAE=; b=thaz6ddvltuLeyRVluskgS2YNe 6XhxjS3iKYleInYkAOSUaMGxjQlrx1MpaL7mBz1UMRG44XX4VtN9ofnwcm63O5M1gskDUT77wT/wL Poc3eVKpy4LTO3PpVOyTYJavC; Received: from 97-122-168-123.hlrn.qwest.net ([97.122.168.123]:47694 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hOPYo-003eEq-JH; Wed, 08 May 2019 11:36:50 -0500 From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 8.3] Fix style bug when paging References: <20190501172240.30569-1-tromey@adacore.com> Date: Wed, 08 May 2019 10:36:49 -0600 In-Reply-To: <20190501172240.30569-1-tromey@adacore.com> (Tom Tromey's message of "Wed, 1 May 2019 11:22:40 -0600") Message-ID: <87ef58lx7i.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 >>>>> "Tom" == Tom Tromey writes: Tom> gdb/ChangeLog Tom> 2019-05-01 Tom Tromey Tom> * utils.c (fputs_maybe_filtered): Reset style after paging, even Tom> when no wrap column is set. When merging this to master I neglected to commit a fixup that I needed. This patch fixes the problem, sorry about that. I'm checking this in. Tom commit ca1df239078318425cf8038995bf02f1b9ab6e50 Author: Tom Tromey Date: Wed May 8 10:35:09 2019 -0600 Fix build problem in fputs_maybe_filtered When merging commit 99f20f ("Fix style bug when paging") to master, I had to make some changes to get it to compile again. Unfortunately, I must not have added these to the index at the correct time, because they were not committed. This patch fixes the problem. gdb/ChangeLog 2019-05-08 Tom Tromey * utils.c (fputs_maybe_filtered): Call can_emit_style_escape as a method. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ca20a7c3654..ec2424a5bc8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-05-08 Tom Tromey + + * utils.c (fputs_maybe_filtered): Call can_emit_style_escape as a + method. + 2019-05-08 Tom Tromey * utils.c (fputs_maybe_filtered): Reset style after paging, even diff --git a/gdb/utils.c b/gdb/utils.c index 10fa5bcce64..96869274735 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1826,7 +1826,7 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream, + (save_chars - wrap_column); wrap_column = 0; /* And disable fancy wrap */ } - else if (did_paginate && can_emit_style_escape (stream)) + else if (did_paginate && stream->can_emit_style_escape ()) emit_style_escape (save_style, stream); } }