0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0969: message written during startup is truncated

Problem:    Message written during startup is truncated.
Solution:   Restore message after truncating. (closes 3969)
This commit is contained in:
Bram Moolenaar
2019-02-22 13:42:07 +01:00
parent 527a2d86fb
commit 97c2c05ead
3 changed files with 19 additions and 0 deletions

View File

@@ -2627,12 +2627,19 @@ msg_puts_printf(char_u *str, int maxlen)
if (*p != NUL && !(silent_mode && p_verbose == 0))
{
int c = -1;
if (maxlen > 0 && STRLEN(p) > (size_t)maxlen)
{
c = p[maxlen];
p[maxlen] = 0;
}
if (info_message)
mch_msg((char *)p);
else
mch_errmsg((char *)p);
if (c != -1)
p[maxlen] = c;
}
msg_didout = TRUE; // assume that line is not empty