Mercurial > vim
diff src/ex_getln.c @ 3277:55cebc7e5de0 v7.3.407
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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 20 Jan 2012 20:44:43 +0100 |
parents | 6ff80dd02b51 |
children | 821c8be2e9d6 |
line wrap: on
line diff
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -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);