* Re: multiple _message call
@ 1999-09-08 8:59 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-09-08 8:59 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* multiple _message call
@ 1999-09-07 19:17 Tanaka Akira
0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 1999-09-07 19:17 UTC (permalink / raw)
To: zsh-workers
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>".
--
Tanaka Akira
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-09-08 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-08 8:59 multiple _message call Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-09-07 19:17 Tanaka Akira
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).