about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-07-03 07:59:53 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-07-03 07:59:53 +0000
commitd98faffcaf274db165cde607f546d62a30853327 (patch)
tree53ed3a15594cd14d7b51cc15180e102282ecc2d8
parentf5c8907ec58c21dcf59b01c45716ca780697861f (diff)
downloadzsh-d98faffcaf274db165cde607f546d62a30853327.tar.gz
zsh-d98faffcaf274db165cde607f546d62a30853327.tar.xz
zsh-d98faffcaf274db165cde607f546d62a30853327.zip
fix for interactive mode when menu selection is called via the menu-select widget (17394)
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/complist.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 42180110b..0b40856cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-03  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 17394: Src/Zle/complist.c: fix for interactive mode when menu
+	selection is called via the menu-select widget
+
 2002-07-02  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 17393: Completion/Unix/Command/_chown,
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index e941d3d95..22e994863 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2201,9 +2201,9 @@ domenuselect(Hookdef dummy, Chdata dat)
 	    menucomplete(zlenoargs);
 	    iforcemenu = 0;
 
-	    if (dat->num < 1 || !minfo.cur || !*(minfo.cur)) {
+	    if ((dat ? dat->num : nmatches) < 1 || !minfo.cur || !*(minfo.cur)) {
 		nolist = 1;
-		if (dat->nmesg || nmessages) {
+		if ((dat ? (dat->nmesg || nmessages) : nmessages)) {
 		    showinglist = -2;
 		    zrefresh();
 		} else {
@@ -2768,13 +2768,13 @@ domenuselect(Hookdef dummy, Chdata dat)
     mselect = mlastcols = mlastlines = -1;
     mstatus = NULL;
     inselect = mhasstat = 0;
-    if (acc) {
+    if (acc && validlist && minfo.cur) {
 	menucmp = lastambig = hasoldlist = 0;
 	do_single(*(minfo.cur));
     }
     if (wasnext || broken) {
 	menucmp = 2;
-	showinglist = -2;
+	showinglist = (validlist ? -2 : 0);
 	minfo.asked = 0;
 	if (!noselect) {
 	    int nos = noselect;
@@ -2784,7 +2784,7 @@ domenuselect(Hookdef dummy, Chdata dat)
 	}
     }
     if (!noselect && (!dat || acc)) {
-	showinglist = -2;
+	showinglist = (validlist ? -2 : 0);
 	onlyexpl = oe;
 	if (!smatches)
 	    clearlist = 1;