From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28165 invoked by alias); 28 Nov 2018 00:14:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28021 invoked by uid 89); 28 Nov 2018 00:14:49 -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,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=2837 X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.4.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Nov 2018 00:14:42 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway20.websitewelcome.com (Postfix) with ESMTP id AAC7B400C5272 for ; Tue, 27 Nov 2018 18:14:41 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id RnV3gwv5PaSeyRnV3g9a6r; Tue, 27 Nov 2018 18:14:41 -0600 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=xo7sco2nRZnjp03xSe/KbeWj+ojIw8earF1bnlIXx2U=; b=okgcGWGWMjBDVu3cYypztPZSut Wi1eDdp5dXoo89CDxkToKHwKE9xMgkBeGStDUPk+7soWsa47LRwX4yKLhqTl7c+O5tjkT42gTaOwR tQNMXEwJLD5QBAxXEcRKYEmFX; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:33804 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gRnV3-004MMp-FW; Tue, 27 Nov 2018 18:14:41 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 14/16] Use wclrtoeol in tui_show_source_line Date: Wed, 28 Nov 2018 00:14:00 -0000 Message-Id: <20181128001435.12703-15-tom@tromey.com> In-Reply-To: <20181128001435.12703-1-tom@tromey.com> References: <20181128001435.12703-1-tom@tromey.com> X-SW-Source: 2018-11/txt/msg00497.txt.bz2 This changes tui_show_source_line to use wclrtoeol rather than manually emitting a sequence of spaces. gdb/ChangeLog 2018-11-27 Tom Tromey * tui/tui-winsource.c (tui_show_source_line): Use wclrtoeol. --- gdb/ChangeLog | 4 ++++ gdb/tui/tui-winsource.c | 8 +------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 49eb4ce6fc..0bf74383b1 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -272,7 +272,6 @@ static void tui_show_source_line (struct tui_win_info *win_info, int lineno) { struct tui_win_element *line; - int x; line = win_info->generic.content[lineno - 1]; if (line->which_element.source.is_exec_point) @@ -284,12 +283,7 @@ tui_show_source_line (struct tui_win_info *win_info, int lineno) wattroff (win_info->generic.handle, A_STANDOUT); /* Clear to end of line but stop before the border. */ - x = getcurx (win_info->generic.handle); - while (x + 1 < win_info->generic.width) - { - waddch (win_info->generic.handle, ' '); - x = getcurx (win_info->generic.handle); - } + wclrtoeol (win_info->generic.handle); } void -- 2.17.2