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

updated for version 7.3.407

Problem:    ":12verbose call F()" may duplicate text while trying to truncate.
            (Thinca)
Solution:   Only truncate when there is not enough room.  Also check the byte
            length of the buffer.
This commit is contained in:
Bram Moolenaar
2012-01-20 20:44:43 +01:00
parent 3ef7cdf0fd
commit f31b764c23
6 changed files with 41 additions and 18 deletions

View File

@@ -5923,7 +5923,7 @@ ex_history(eap)
hist[i].hisnum);
if (vim_strsize(hist[i].hisstr) > (int)Columns - 10)
trunc_string(hist[i].hisstr, IObuff + STRLEN(IObuff),
(int)Columns - 10);
(int)Columns - 10, IOSIZE - STRLEN(IObuff));
else
STRCAT(IObuff, hist[i].hisstr);
msg_outtrans(IObuff);