Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: Question
- X-seq: zsh-workers 10724
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: Re: Question
- Date: Thu, 13 Apr 2000 09:59:51 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Wed, 12 Apr 2000 16:10:20 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> On Apr 12, 10:30am, Sven Wischnowsky wrote:
> } Subject: PATCH: Re: Question
> }
> } Peter Stephenson wrote:
> }
> } > Sven Wischnowsky wrote:
> } > > Currently, if a completion list is too long, the completion system
> } > > asks if onw wants to see all <n> matches.
> } > >
> } > > Should we change it to mention the number of lines needed?
> }
> } - qup = printfmt("zsh: do you wish to see all %n possibilities? ",
> } - listdat.nlist, 1, 1);
> } + qup = printfmt("zsh: do you wish to see all %n lines? ",
> } + listdat.nlines, 1, 1);
>
> Oh, I thought you were going to ADD the information about the number of
> lines needed, not replace the number of matches with it. I want to see
> the number of matches in there, at least when it's greater than zero.
No problem.
Bye
Sven
Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.5
diff -u -r1.5 compresult.c
--- Src/Zle/compresult.c 2000/04/12 09:12:16 1.5
+++ Src/Zle/compresult.c 2000/04/13 07:59:09
@@ -1587,10 +1587,15 @@
((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) {
Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.4
diff -u -r1.4 zle_tricky.c
--- Src/Zle/zle_tricky.c 2000/04/12 08:31:55 1.4
+++ Src/Zle/zle_tricky.c 2000/04/13 07:59:09
@@ -1988,11 +1988,14 @@
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) {
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author