summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/complist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index ccee9a724..18551d05d 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2071,6 +2071,7 @@ complistmatches(UNUSED(Hookdef dummy), Chdata dat)
 	memset(mgtab, 0, i * sizeof(Cmgroup));
 	mlastcols = mcols = zterm_columns;
 	mlastlines = mlines = listdat.nlines;
+	mmtabp = 0;
     }
     last_cap = (char *) zhalloc(max_caplen + 1);
     *last_cap = '\0';
@@ -2562,6 +2563,8 @@ domenuselect(Hookdef dummy, Chdata dat)
 	}
 	p = mmtabp;
 	pg = mgtabp;
+	if (!p) /* selected match not in display, find line */
+	    continue;
 	minfo.cur = *p;
 	minfo.group = *pg;
 	if (setwish)