about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-08 15:25:01 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-08 15:25:01 +0000
commit4a376d7250e899851f0bbd68898f619d750459c4 (patch)
treebcf7cb7d0dd1d875e15e518b05040cab97583e28
parentf6d71cda8c3ef0774cbea21c944f8787488f09f2 (diff)
downloadzsh-4a376d7250e899851f0bbd68898f619d750459c4.tar.gz
zsh-4a376d7250e899851f0bbd68898f619d750459c4.tar.xz
zsh-4a376d7250e899851f0bbd68898f619d750459c4.zip
fix for listpacked for matches as long as screen is wide (minus added spaces); more security when freeing matches: make sure current menu match pointer isn't used afterwards (13331)
-rw-r--r--ChangeLog7
-rw-r--r--Src/Zle/compcore.c1
-rw-r--r--Src/Zle/compresult.c8
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 42fb5d75d..a2b771cbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-01-08  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 13331: Src/Zle/compcore.c, Src/Zle/compresult.c: fix for
+ 	listpacked for matches as long as screen is wide (minus added
+ 	spaces); more security when freeing matches: make sure current
+ 	menu match pointer isn't used afterwards
+	
 2001-01-07  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* 13327: Etc/MACHINES: builds out of the box on SCO UnixWare
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index fa8104169..06e7afbfb 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -2932,4 +2932,5 @@ freematches(Cmgroup g)
 
 	g = n;
     }
+    minfo.cur = NULL;
 }
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 7b2707681..f30d8259a 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1495,7 +1495,7 @@ calclist(int showall)
 				ws[tcol++] = maxlen;
 				width += maxlen;
 			    }
-			    if (!count && width < columns &&
+			    if (!count && width <= columns &&
 				(tcols <= 0 || beg == end))
 				break;
 
@@ -1536,7 +1536,7 @@ calclist(int showall)
 				ws[tcols++] = maxlen;
 				width += maxlen;
 			    }
-			    if (nth == yl && width < columns &&
+			    if (nth == yl && width <= columns &&
 				(beg == end || tlines >= g->lins))
 				break;
 
@@ -1593,7 +1593,7 @@ calclist(int showall)
 			    ws[tcol++] = maxlen;
 			    width += maxlen;
 			}
-			if (!count && width < columns &&
+			if (!count && width <= columns &&
 			    (tcols <= 0 || beg == end))
 			    break;
 
@@ -1642,7 +1642,7 @@ calclist(int showall)
 			    ws[tcols++] = maxlen;
 			    width += maxlen;
 			}
-			if (nth == g->dcount && width < columns &&
+			if (nth == g->dcount && width <= columns &&
 			    (beg == end || tlines >= g->lins))
 			    break;