0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -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

@@ -3258,9 +3258,8 @@ maketitle()
if (maxlen > 0)
{
/* make it shorter by removing a bit in the middle */
len = vim_strsize(buf);
if (len > maxlen)
trunc_string(buf, buf, maxlen);
if (vim_strsize(buf) > maxlen)
trunc_string(buf, buf, maxlen, IOSIZE);
}
}
}