about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-10-06 16:49:27 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-10-06 16:49:27 +0000
commite9fbed31698ef0591c53248f60e922cd8ae3bf2d (patch)
treeae6bd36c7d6507031bd6d1d5e9280ccdcc74c101
parent3cd621b7a3fb66c212d0fcd692fc2204aa0852a6 (diff)
downloadzsh-e9fbed31698ef0591c53248f60e922cd8ae3bf2d.tar.gz
zsh-e9fbed31698ef0591c53248f60e922cd8ae3bf2d.tar.xz
zsh-e9fbed31698ef0591c53248f60e922cd8ae3bf2d.zip
22820: this time, fix handling of long accumulated completion line
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/compresult.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c9ba931c3..836e20cdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-10-06  Peter Stephenson  <pws@csr.com>
 
+	* 22820: Src/Zle/compresult.c: no, users/10791 wasn't right
+	and now I'm bored so this will have to do.
+
 	* 10791: Src/Zle/compresult.c: accumulated completions
 	on single line could cause border disputes resulting in
 	skirmishes with cursor position.
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 94c651101..213189f11 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -2069,7 +2069,7 @@ bld_all_str(Cmatch all)
 		if (add)
 		    strcat(buf, " ");
 		strcat(buf, m->str);
-		len -= t + add;
+		len -= t;
 		add = 1;
 	    } else {
 		if (len > add + 2) {
@@ -2077,7 +2077,7 @@ bld_all_str(Cmatch all)
 			strcat(buf, " ");
 		    strncat(buf, m->str, len);
 		}
-		strcat(buf, " ...");
+		strcat(buf, "...");
 		break;
 	    }
 	}