From af92f874e179bdfad66dea04532178fb82226ef9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 28 Mar 2008 23:21:26 +0000 Subject: 24777: bug clearing up after menu selection --- ChangeLog | 6 ++++++ Src/Zle/complist.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 15e0fb30a..a39c9accc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-28 Peter Stephenson + + * 24777: Src/Zle/complist.c: bug clearing a list when + exiting from menu selection in some circumstances (see + 24756 for test case). + 2008-03-28 Peter Stephenson * 24776: Completion/compinit: clarify the message printed diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index 0daef7941..698837942 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -53,7 +53,7 @@ static int noselect, mselect, inselect, mcol, mline, mcols, mlines; * selected: Used to signal between domenucomplete() and menuselect() * that a selected entry has been found. Or something. * mlbeg: The first line of the logical array of all matches that - * fits on screen. + * fits on screen. Setting this to -1 forces a redraw. * mlend: The line after the last that fits on screen. * mscroll: 1 if the scrolling prompt is shown on screen. * mrestlines: The number of screen lines remaining to be processed. @@ -3216,6 +3216,15 @@ domenuselect(Hookdef dummy, Chdata dat) } } if (!noselect && (!dat || acc)) { + /* + * I added the following because in certain cases the zrefresh() + * here was screwing up the list. Forcing it to redraw the + * screen worked. The case in question (courtesy of + * "Matt Wozniski" ) is in zsh-workers/24756. + * + * *** PLEASE DON'T ASK ME WHY THIS IS NECESSARY *** + */ + mlbeg = -1; showinglist = ((validlist && !nolist) ? -2 : 0); onlyexpl = oe; if (!smatches) -- cgit 1.4.1