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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user