From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id DA3F91F8C6 for ; Fri, 10 Sep 2021 11:46:53 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei up: only delay non-zero "# $NR written to ..." Date: Fri, 10 Sep 2021 11:46:53 +0000 Message-Id: <20210910114653.4948-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: "# 0 written to $FOLDER" messages aren't important to the user, so we can show them in real time and allow them to be lost in the terminal scroll. When >0 messages are written to a folder, we'll show them last so a user will know which folders to open with their MUA. --- lib/PublicInbox/LeiXSearch.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index b6d7bf2b..709a3b3a 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -400,8 +400,9 @@ Error closing $lei->{ovv}->{dst}: $! my $tot = $lei->{-mset_total} // 0; my $nr = $lei->{-nr_write} // 0; if ($l2m) { - $lei->qfin("# $nr written to " . - "$lei->{ovv}->{dst} ($tot matches)"); + my $m = "# $nr written to " . + "$lei->{ovv}->{dst} ($tot matches)"; + $nr ? $lei->qfin($m) : $lei->qerr($m); } else { $lei->qerr("# $tot matches"); }