From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1820 invoked from network); 8 Sep 1999 08:59:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Sep 1999 08:59:50 -0000 Received: (qmail 6687 invoked by alias); 8 Sep 1999 08:59:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7714 Received: (qmail 6680 invoked from network); 8 Sep 1999 08:59:37 -0000 Date: Wed, 8 Sep 1999 10:59:35 +0200 (MET DST) Message-Id: <199909080859.KAA05557@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 08 Sep 1999 04:17:08 +0900 Subject: Re: multiple _message call Tanaka Akira wrote: > I found a problem with _message. > > Z(2):akr@is27e1u11% Src/zsh -f > is27e1u11% echo <^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 > > After above operation, I get: > > is27e1u11% tst > a @<- cursor here. > b > > Although I don't know why, this does not happen without first "echo <^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