From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 39B383858C41 for ; Sat, 20 May 2023 05:47:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 39B383858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0FRT-0007tt-7C; Sat, 20 May 2023 01:47:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=dsDWgrUr69XL6VNiPV9qU2h3UgG2sqpXcOYHYKUMh+Q=; b=rbAZcUHBkeOSvM2UirYT UnGzX0Cc2xn5soNTz6GsIaf2X8opZU+1z2urb0wnEWt5l7loxmchgnnNA+xkxwnKoaBy3iI/A22DM 0eSH0BwvHAO/dRZ/I301J+7u6HAzjoiGC4JfFJhO9KyDN7HTSI1ko/Uq2mjxj9n9G2YS7bzC3+kqA 70lkn1PF3dERfXBcsuRmEhl1fekh/YQLqto/ZTT4+JxxTbDPNQmWAim0/wYfqExzoIslxxSn5VrEw TssHyhTJ90AJ5pCl7ztB0Zd85sEFpHB1S/Avit1CHcnxZedNk0q2RAzk/SygHLWW9DrkNcAZJ0RP5 H0fNF5Tl8E0Qcw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0FRS-0003hI-JD; Sat, 20 May 2023 01:47:46 -0400 Date: Sat, 20 May 2023 08:48:03 +0300 Message-Id: <831qjbtuy4.fsf@gnu.org> From: Eli Zaretskii To: Aaron Merey Cc: gdb-patches@sourceware.org In-Reply-To: <20230519213824.117794-1-amerey@redhat.com> (message from Aaron Merey on Fri, 19 May 2023 17:38:24 -0400) Subject: Re: [PATCH] gdb/cli-out.c: clear_current_line shouldn't trigger pagination prompt References: <831qjh104j.fsf@gnu.org> <20230519213824.117794-1-amerey@redhat.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Aaron Merey > Cc: gdb-patches@sourceware.org, > Aaron Merey > Date: Fri, 19 May 2023 17:38:24 -0400 > > On Mon, May 15, 2023 at 10:27 PM Eli Zaretskii wrote: > > > > > From: Aaron Merey > > > Date: Mon, 15 May 2023 17:32:48 -0400 > > > Cc: gdb-patches@sourceware.org > > > > > > > I'm not sure we should rely on the fact that the final character of > > > > the line is never there. clear_current_line is a general-purpose > > > > method, so it should do its job regardless. > > > > > > > > Can't we do something to handle the last character as well? E.g., > > > > could it be possible first to delete one character, so there are > > > > really only N-1 characters to fill with blank spaces? > > > > > > We could rename clear_current_line to something like clear_progress_notify > > > to help indicate that this is a special purpose function. We could also > > > just disable pagination for the duration of clear_current_line. > > > > I think we should do both, thanks. > > I revised the patch with clear_current_line renamed to clear_progress_notify. > This function has been changed back to overwriting an entire line with whitespace > and pagination is disabled for its duration. Thanks. Acked-by: Eli Zaretskii