Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
- X-seq: zsh-workers 8535
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
- Date: Thu, 4 Nov 1999 11:33:34 +0100 (MET)
- In-reply-to: "Bart Schaefer"'s message of Wed, 3 Nov 1999 16:40:35 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author