1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01: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> 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 * 17189: Completion/Unix/Type/_path_files: better splitting of
-g-strings; this failed when patterns contained spaces -g-strings; this failed when patterns contained spaces

View file

@ -579,8 +579,8 @@ cd_get(char **params)
memset(buf, ' ', cd_state.pre); memset(buf, ' ', cd_state.pre);
memcpy(buf, str->str, str->len); memcpy(buf, str->str, str->len);
strcpy(sufp, str->desc); strcpy(sufp, str->desc);
if (strlen(buf) >= columns) if (strlen(buf) >= columns - 1)
buf[columns] = '\0'; buf[columns - 1] = '\0';
*dp++ = ztrdup(buf); *dp++ = ztrdup(buf);
} }
*mp = *dp = NULL; *mp = *dp = NULL;