about summary refs log tree commit diff
path: root/Src/Zle/compresult.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-25 13:54:09 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-25 13:54:09 +0000
commitbc21696b63fbc01f34351630f15a196134c8a458 (patch)
tree96d322841280e7aa8721df8ff360a199538ecffe /Src/Zle/compresult.c
parentd3c918b863d4580f06b378fd5424346c6e8e679d (diff)
downloadzsh-bc21696b63fbc01f34351630f15a196134c8a458.tar.gz
zsh-bc21696b63fbc01f34351630f15a196134c8a458.tar.xz
zsh-bc21696b63fbc01f34351630f15a196134c8a458.zip
don't show empty hidden matches even in menu-selection (10917)
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r--Src/Zle/compresult.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 8c09a9491..f40ee6724 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -951,8 +951,10 @@ do_menucmp(int lst)
 	    } while (!(minfo.group)->mcount);
 	    minfo.cur = minfo.group->matches;
 	}
-    } while (menuacc &&
-	     !hasbrpsfx(*(minfo.cur), minfo.prebr, minfo.postbr));
+    } while ((menuacc &&
+	      !hasbrpsfx(*(minfo.cur), minfo.prebr, minfo.postbr)) ||
+	     (((*minfo.cur)->flags & (CMF_NOLIST | CMF_MULT)) &&
+	      (!(*minfo.cur)->str || !*(*minfo.cur)->str)));
     /* ... and insert it into the command line. */
     metafy_line();
     do_single(*(minfo.cur));
@@ -972,8 +974,10 @@ reverse_menu(Hookdef dummy, void *dummy2)
 	    minfo.cur = (minfo.group)->matches + (minfo.group)->mcount - 1;
 	} else
 	    minfo.cur--;
-    } while (menuacc &&
-	     !hasbrpsfx(*(minfo.cur), minfo.prebr, minfo.postbr));
+    } while ((menuacc &&
+	      !hasbrpsfx(*(minfo.cur), minfo.prebr, minfo.postbr)) ||
+	     (((*minfo.cur)->flags & (CMF_NOLIST | CMF_MULT)) &&
+	      (!(*minfo.cur)->str || !*(*minfo.cur)->str)));
     metafy_line();
     do_single(*(minfo.cur));
     unmetafy_line();
@@ -1244,6 +1248,11 @@ calclist(int showall)
 		    if (!(m->flags & CMF_ROWS))
 			g->flags &= ~CGF_ROWS;
 		} else if (showall || !(m->flags & (CMF_NOLIST | CMF_MULT))) {
+		    if ((m->flags & (CMF_NOLIST | CMF_MULT)) &&
+			(!m->str || !*m->str)) {
+			m->flags |= CMF_HIDE;
+			continue;
+		    }
 		    l = niceztrlen(m->str);
 		    ndisp++;
 		    if (l > glong)