From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2942 invoked from network); 13 Apr 2000 08:00:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Apr 2000 08:00:10 -0000 Received: (qmail 28095 invoked by alias); 13 Apr 2000 07:59:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10724 Received: (qmail 28080 invoked from network); 13 Apr 2000 07:59:59 -0000 Date: Thu, 13 Apr 2000 09:59:51 +0200 (MET DST) Message-Id: <200004130759.JAA12664@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Wed, 12 Apr 2000 16:10:20 +0000 Subject: Re: PATCH: Re: Question 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 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@informatik.hu-berlin.de