unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] lei up: only delay non-zero "# $NR written to ..."
@ 2021-09-10 11:46 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-09-10 11:46 UTC (permalink / raw)
  To: meta

"# 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");
 		}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-10 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 11:46 [PATCH] lei up: only delay non-zero "# $NR written to ..." Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).