summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/complist.c11
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 15e0fb30a..a39c9accc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-28 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * 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 <pws@csr.com>
* 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" <godlygeek@gmail.com>) 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)