1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

avoid printing in the last screen column when preparing a completion listing with compdescribe (17190)

This commit is contained in:
Sven Wischnowsky 2002-05-21 07:39:40 +00:00
parent 477cc33aae
commit d4ec8d06bf
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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;