From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: Question
Date: Thu, 13 Apr 2000 09:59:51 +0200 (MET DST) [thread overview]
Message-ID: <200004130759.JAA12664@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Wed, 12 Apr 2000 16:10:20 +0000
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@informatik.hu-berlin.de
next reply other threads:[~2000-04-13 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-13 7:59 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-04-13 8:40 Sven Wischnowsky
2000-04-12 8:30 Sven Wischnowsky
2000-04-12 16:10 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200004130759.JAA12664@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).