about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/computil.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 37584a3d6..eb19fde40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-05-21  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 17190: Src/Zle/computil.c: avoid printing in the last screen
+	column when preparing a completion listing with compdescribe
+
 	* 17189: Completion/Unix/Type/_path_files: better splitting of
 	-g-strings; this failed when patterns contained spaces
 
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index f6c9b54e9..f83bef9cc 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -579,8 +579,8 @@ cd_get(char **params)
                     memset(buf, ' ', cd_state.pre);
                     memcpy(buf, str->str, str->len);
                     strcpy(sufp, str->desc);
-                    if (strlen(buf) >= columns)
-                        buf[columns] = '\0';
+                    if (strlen(buf) >= columns - 1)
+                        buf[columns - 1] = '\0';
                     *dp++ = ztrdup(buf);
                 }
                 *mp = *dp = NULL;