about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-13 08:05:57 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-13 08:05:57 +0000
commita8400e82b14cf69b4952d34e7d30bbe454c63fcc (patch)
tree3c4716cd121100780e4ecd99178878b2651b589e
parent3715a5bbcfa0270067a781bb1d776871c4994de5 (diff)
downloadzsh-a8400e82b14cf69b4952d34e7d30bbe454c63fcc.tar.gz
zsh-a8400e82b14cf69b4952d34e7d30bbe454c63fcc.tar.xz
zsh-a8400e82b14cf69b4952d34e7d30bbe454c63fcc.zip
display number of matches again when asking if a completion list should be shown (only when not zero) (10724)
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/compresult.c11
-rw-r--r--Src/Zle/zle_tricky.c9
3 files changed, 20 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e117d221..37d21335e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-04-13  Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
+
+	* 10724: Src/Zle/compresult.c, Src/Zle/zle_tricky.c: display
+ 	number of matches again when asking if a completion list should be
+ 	shown (only when not zero)
+	
 2000-04-12  Bart Schaefer  <schaefer@brasslantern.com>
 
 	* 10706: Andrej: Completion/User/_man: Fix quoting in awk args.
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 3322c3157..c7217778c 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1587,10 +1587,15 @@ mod_export int asklist(void)
 	((complistmax > 0 && listdat.nlist >= complistmax) ||
 	 (complistmax < 0 && listdat.nlines <= -complistmax) ||
 	 (!complistmax && listdat.nlines >= lines))) {
-	int qup;
+	int qup, l;
+
 	zsetterm();
-	qup = printfmt("zsh: do you wish to see all %n lines? ",
-		       listdat.nlines, 1, 1);
+	l = (listdat.nlist > 0 ?
+	     fprintf(shout, "zsh: do you wish to see all %d possibilities (%d lines)? ",
+		     listdat.nlist, listdat.nlines) :
+	     fprintf(shout, "zsh: do you wish to see all %d lines? ",
+		     listdat.nlines));
+	qup = ((l + columns - 1) / columns) - 1;
 	fflush(shout);
 	if (getzlequery() != 'y') {
 	    if (clearflag) {
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 4c7286ee9..51a77b224 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1988,11 +1988,14 @@ listlist(LinkList l)
 
     max = getiparam("LISTMAX");
     if ((max && num > max) || (!max && nlines > lines)) {
-	int qup;
+	int qup, l;
 
 	zsetterm();
-	qup = printfmt("zsh: do you wish to see all %n lines? ",
-		       nlines, 1, 1);
+	l = (num > 0 ?
+	     fprintf(shout, "zsh: do you wish to see all %d possibilities (%d lines)? ",
+		     num, nlines) :
+	     fprintf(shout, "zsh: do you wish to see all %d lines? ", nlines));
+	qup = ((l + columns - 1) / columns) - 1;
 	fflush(shout);
 	if (getzlequery() != 'y') {
 	    if (clearflag) {