diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-05-21 07:39:40 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-05-21 07:39:40 +0000 |
commit | d4ec8d06bf619eccd92ed8ca0f388ab9ea2e4189 (patch) | |
tree | c0e6ef80ddf18df5b478cc988d55971435ef6cd6 /Src | |
parent | 477cc33aaef10c3afcef758a51dc390b8d45d0b3 (diff) | |
download | zsh-d4ec8d06bf619eccd92ed8ca0f388ab9ea2e4189.tar.gz zsh-d4ec8d06bf619eccd92ed8ca0f388ab9ea2e4189.tar.xz zsh-d4ec8d06bf619eccd92ed8ca0f388ab9ea2e4189.zip |
avoid printing in the last screen column when preparing a completion listing with compdescribe (17190)
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/computil.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |