summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-05-21 07:39:40 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-05-21 07:39:40 +0000
commitd4ec8d06bf619eccd92ed8ca0f388ab9ea2e4189 (patch)
treec0e6ef80ddf18df5b478cc988d55971435ef6cd6
parent477cc33aaef10c3afcef758a51dc390b8d45d0b3 (diff)
downloadzsh-d4ec8d06bf619eccd92ed8ca0f388ab9ea2e4189.tar.gz
zsh-d4ec8d06bf619eccd92ed8ca0f388ab9ea2e4189.zip
avoid printing in the last screen column when preparing a completion listing with compdescribe (17190)
-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;