From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3455 invoked from network); 4 Nov 1999 11:31:32 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Nov 1999 11:31:32 -0000 Received: (qmail 4768 invoked by alias); 4 Nov 1999 11:29:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8535 Received: (qmail 4761 invoked from network); 4 Nov 1999 11:29:30 -0000 Date: Thu, 4 Nov 1999 11:33:34 +0100 (MET) Message-Id: <199911041033.LAA00917@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Wed, 3 Nov 1999 16:40:35 +0000 Subject: Re: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities Bart Schaefer wrote: > On Nov 3, 12:53pm, Sven Wischnowsky wrote: > } Subject: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities > } > } > Oops! No more completion there inside /tools/share/zsh/functions > } > } Because (as it said above), there are too many matches to display > } them. I was aware of this when I wrote that code but didn't know what > } to do - -so I just made it give up. But what do you think, it should > } do? It *can't* display the menu in this case... Should we disallow > } a-a-i-n-h in this case? I think this would be even weirder. > > How about this: Drop back into regular menu completion and produce the > "do you wish to see ...?" prompt. Blink. Of course... Bye Sven diff -u oldsrc/Zle/compcore.c Src/Zle/compcore.c --- oldsrc/Zle/compcore.c Wed Nov 3 12:53:50 1999 +++ Src/Zle/compcore.c Thu Nov 4 11:23:30 1999 @@ -428,7 +428,7 @@ /* If we are doing a menu-completion... */ if (menucmp && *lst != COMP_LIST_EXPAND && - (!compwidget || compwidget == lastcompwidget)) { + (menucmp != 1 || !compwidget || compwidget == lastcompwidget)) { do_menucmp(*lst); return 1; } diff -u oldsrc/Zle/complist.c Src/Zle/complist.c --- oldsrc/Zle/complist.c Wed Nov 3 12:53:50 1999 +++ Src/Zle/complist.c Thu Nov 4 11:30:04 1999 @@ -545,7 +545,7 @@ Cmgroup *pg; Thingy cmd; Menustack u = NULL; - int i = 0, acc = 0, wishcol = 0, setwish = 0, oe = onlyexpl; + int i = 0, acc = 0, wishcol = 0, setwish = 0, oe = onlyexpl, wasnext = 0; char *s; HEAPALLOC { @@ -591,7 +591,7 @@ while (mcol < mcols - 1 && p[1] == minfo.cur) mcol++, p++, pg++; } - setwish = 0; + setwish = wasnext = 0; getk: @@ -634,7 +634,7 @@ } clearlist = listshown = 1; mselect = (*(minfo.cur))->gnum; - setwish = 1; + setwish = wasnext = 1; continue; } else if (cmd == Th(z_acceptandhold) || cmd == Th(z_acceptandmenucomplete)) { @@ -858,6 +858,11 @@ if (acc) { menucmp = lastambig = hasoldlist = 0; do_single(*(minfo.cur)); + } + if (wasnext) { + menucmp = 2; + showinglist = -2; + minfo.asked = 0; } if (!noselect) { showinglist = -2; diff -u oldsrc/Zle/zle_tricky.c Src/Zle/zle_tricky.c --- oldsrc/Zle/zle_tricky.c Wed Nov 3 12:53:51 1999 +++ Src/Zle/zle_tricky.c Thu Nov 4 11:24:49 1999 @@ -77,7 +77,8 @@ /**/ int usemenu, useglob; -/* != 0 if we are in the middle of a menu completion. */ +/* != 0 if we are in the middle of a menu completion. May be == 2 to force * + * menu completion even if using different widgets. */ /**/ int menucmp; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de