about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-02-28 23:12:37 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-02-28 23:12:37 +0000
commitbc45a1b9942ff8d12e77fc038c265b8debc1ea77 (patch)
treef01136b30ef44b56a6c8c5c0f1059e2811fb43e6 /Src/Zle
parente01ff4c18ae305a45864b8c0104804676b6112e0 (diff)
downloadzsh-bc45a1b9942ff8d12e77fc038c265b8debc1ea77.tar.gz
zsh-bc45a1b9942ff8d12e77fc038c265b8debc1ea77.tar.xz
zsh-bc45a1b9942ff8d12e77fc038c265b8debc1ea77.zip
24672: fix(?) crash resizing window during menu-select
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/complist.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 97b55b609..0daef7941 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -122,7 +122,11 @@ static struct listcols mcolors;
 int mgtabsize;
 #endif
 
-/* Used in mtab/mgtab, for explanations. */
+/*
+ * Used in mtab/mgtab, for explanations.
+ *
+ * UUUUUUUUUUUUUUURRRRGHHHHHHHHHH!!!!!!!!! --- pws
+ */
 
 #define MMARK       ((unsigned long) 1)
 #define mmarked(v)  (((unsigned long) (v)) & MMARK)
@@ -2325,8 +2329,7 @@ domenuselect(Hookdef dummy, Chdata dat)
     for (;;) {
 	METACHECK();
 
-    	mtab_been_reallocated = 0;
-	if (mline < 0) {
+	if (mline < 0 || mtab_been_reallocated) {
 	    int x, y;
 	    Cmatch **p = mtab;
 
@@ -2342,6 +2345,7 @@ domenuselect(Hookdef dummy, Chdata dat)
 	    if (y < mlines)
 		mline = y;
 	}
+    	mtab_been_reallocated = 0;
 	DPUTS(mline < 0,
 	      "BUG: mline < 0 after re-scanning mtab in domenuselect()");
 	while (mline < mlbeg)