diff options
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index ca2b356863..9a4d413358 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -2118,10 +2118,13 @@ static void qf_msg(qf_info_T *qi, int which, char *lead) count); if (title != NULL) { - while (STRLEN(buf) < 34) { - STRCAT(buf, " "); + size_t len = STRLEN(buf); + + if (len < 34) { + memset(buf + len, ' ', 34 - len); + buf[34] = NUL; } - vim_strcat(buf, title, IOSIZE); + vim_strcat(buf, (char_u *)title, IOSIZE); } trunc_string(buf, buf, (int)Columns - 1, IOSIZE); msg(buf); |