summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-03-28 23:21:26 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-03-28 23:21:26 +0000
commitaf92f874e179bdfad66dea04532178fb82226ef9 (patch)
tree45677147fdcaffc25f7546801ca4a673891a986d
parent0390d69f27554935e0f84b33982ae3739e75fa76 (diff)
downloadzsh-af92f874e179bdfad66dea04532178fb82226ef9.tar.gz
zsh-af92f874e179bdfad66dea04532178fb82226ef9.tar.xz
zsh-af92f874e179bdfad66dea04532178fb82226ef9.zip
24777: bug clearing up after menu selection
-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)