From fbc97e72e8f3f0b9be9bd3f24f36a1e8e5a6701d Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 29 Jun 2015 01:46:39 +0200 Subject: [PATCH] 35623: fix menu-selection where initial selection would not be displayed without scrolling --- ChangeLog | 5 +++++ Src/Zle/complist.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index c70c0de9f..2ea6492e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-06-29 Oliver Kiddle + + * 35623: Src/Zle/complist.c: fix menu-selection where initial + selection would not be displayed without scrolling + 2015-06-28 Peter Stephenson * 35643: Src/parse.c: redirections after typeset assignments 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)