about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compcore.c2
-rw-r--r--Src/Zle/complist.c11
-rw-r--r--Src/Zle/zle_tricky.c3
3 files changed, 11 insertions, 5 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index b37855fd0..b6e957e99 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -428,7 +428,7 @@ before_complete(Hookdef dummy, int *lst)
     /* 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 --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 356b26c2b..5f40ffb9a 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -545,7 +545,7 @@ domenuselect(Hookdef dummy, Chdata dat)
     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 @@ domenuselect(Hookdef dummy, Chdata dat)
 		while (mcol < mcols - 1 && p[1] == minfo.cur)
 		    mcol++, p++, pg++;
 	    }
-	    setwish = 0;
+	    setwish = wasnext = 0;
 
 	getk:
 
@@ -634,7 +634,7 @@ domenuselect(Hookdef dummy, Chdata dat)
 		}
 		clearlist = listshown = 1;
 		mselect = (*(minfo.cur))->gnum;
-		setwish = 1;
+		setwish = wasnext = 1;
 		continue;
 	    } else if (cmd == Th(z_acceptandhold) ||
 		       cmd == Th(z_acceptandmenucomplete)) {
@@ -859,6 +859,11 @@ domenuselect(Hookdef dummy, Chdata dat)
 	    menucmp = lastambig = hasoldlist = 0;
 	    do_single(*(minfo.cur));
 	}
+	if (wasnext) {
+	    menucmp = 2;
+	    showinglist = -2;
+	    minfo.asked = 0;
+	}
 	if (!noselect) {
 	    showinglist = -2;
 	    onlyexpl = oe;
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 14c1791d1..09a15d407 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -77,7 +77,8 @@ int offs;
 /**/
 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;