Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: multiple _message call
- X-seq: zsh-workers 7714
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: multiple _message call
- Date: Wed, 8 Sep 1999 10:59:35 +0200 (MET DST)
- In-reply-to: Tanaka Akira's message of 08 Sep 1999 04:17:08 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Tanaka Akira wrote:
> I found a problem with _message.
>
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% echo <TAB><^C>
> is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d' describe_options=yes
> is27e1u11% _tst () { _message a; _message b }
> is27e1u11% tst <TAB>
>
> After above operation, I get:
>
> is27e1u11% tst
> a @<- cursor here.
> b
>
> Although I don't know why, this does not happen without first "echo <TAB><^C>".
It had a small problem when counting the number of matches to show.
Bye
Sven
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Mon Sep 6 14:51:26 1999
+++ Src/Zle/zle_tricky.c Wed Sep 8 10:56:39 1999
@@ -2739,7 +2739,7 @@
mpl - rpl, 0);
pli = matchparts;
}
- r = dupstring(matchbuf);
+ r = dupstring(matchbuf ? matchbuf : "");
*clp = pli;
@@ -7133,7 +7133,8 @@
((g->flags & CGF_NOSORT) ? 0 : 2),
&nn, &nl);
g->mcount = nn;
- g->lcount = nn - nl;
+ if ((g->lcount = nn - nl) < 0)
+ g->lcount = 0;
if (g->ylist) {
g->lcount = arrlen(g->ylist);
smatches = 2;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author