From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 33F51385771B for ; Mon, 15 May 2023 21:33:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33F51385771B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684186384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PgSeKf01Wsq7Fjc5XY9fI/womVsbKQCNGkWH6SRhrcE=; b=BXUtCxRz1gqL+Z7+IuYRjeCH1x/r5J6qL2sIsY4YZL61HCPRvqtfG9pQom71RAHSUJ82w/ UMJ/KlpopMonMxhUd8i9/HHa8wrmI9EQJl5/CHqWfiFApgjImKqG7INqE73rKqftED5hIi Lb46TpwaXLdspGjNmp/ds8fL7wYyokU= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-175-vOE-pA8lPpG89OD71RfdWw-1; Mon, 15 May 2023 17:33:01 -0400 X-MC-Unique: vOE-pA8lPpG89OD71RfdWw-1 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-1aaf4715b53so131298925ad.2 for ; Mon, 15 May 2023 14:33:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684186380; x=1686778380; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PgSeKf01Wsq7Fjc5XY9fI/womVsbKQCNGkWH6SRhrcE=; b=CWb1g0OkFRR7L3N7pugBVKVfflexD4KA2/M5jry3mo3MMXK7Djnek4X1Cg4l6CfsjI px8vpxEN0EMKBbTxAbAELnbm0SlCJJjcW/LkTokOs36xB44I3mpMiST5IQPAVq0JLLPJ oKf/SDDz7V3xzBbejZlxVxSLfs64wP8trklu/r02VEOnNKgxErXo1VIP3eS8xNWGKbdC bRayfIvq+7CZueoCWh43e66vt0nnrxi9NHa/7puZ9wziou5fRFJ692kKlxDiPDysU7q4 HqVc4KqH9KR4esAKobf7Xq6dKuChTtCX7VbKE4gQuIA8ENDC//Y8gQFJ6nlN/hrgryeH N3Lw== X-Gm-Message-State: AC+VfDzWtXO3sXsk7euIcSro3vE5WHjelTszbdIMRH2nXyfS+9R0Iwd5 OnjFfAUAraNcZFlnBESyHkto5ZZrt9vuMNA83yQ07j5CmB5u0l1qy+FWK83WJRHg+zNbF16aZJH t7W1f62UqqJ30QIOM6VSPsbTXS7vRReuTQenKVwILagIIjBc= X-Received: by 2002:a17:902:c2c4:b0:1ae:4:da97 with SMTP id c4-20020a170902c2c400b001ae0004da97mr6857328pla.4.1684186380310; Mon, 15 May 2023 14:33:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5y9SLB6hwuniMD4dIZeTE7nA8nFRSV7rq7LytYL/4WFBVSWLz4B/PFxUd+Rdz01jwSPHDsiQtEr59g74C8r+Y= X-Received: by 2002:a17:902:c2c4:b0:1ae:4:da97 with SMTP id c4-20020a170902c2c400b001ae0004da97mr6857311pla.4.1684186379903; Mon, 15 May 2023 14:32:59 -0700 (PDT) MIME-Version: 1.0 References: <20230511232203.247173-1-amerey@redhat.com> <83h6si3vva.fsf@gnu.org> In-Reply-To: <83h6si3vva.fsf@gnu.org> From: Aaron Merey Date: Mon, 15 May 2023 17:32:48 -0400 Message-ID: Subject: Re: [PATCH] gdb/cli-out.c: clear_current_line shouldn't trigger pagination prompt To: Eli Zaretskii Cc: gdb-patches@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Eli, On Fri, May 12, 2023 at 2:50=E2=80=AFAM Eli Zaretskii wrote: > > > Cc: Aaron Merey > > Date: Thu, 11 May 2023 19:22:03 -0400 > > From: Aaron Merey via Gdb-patches > > > > This patch removes the possibility for clear_current_line to trigger th= e > > prompt by only printing chars_per_line - 1 blank spaces. clear_current= _line > > is only ever called to clear download progress bars, which do not print > > anything on the final character of a line. > > 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'm not sure we can delete a character without incrementing chars_per_line. Aaron