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.
diff --git a/src/buffer.c b/src/buffer.c
index 2884b30..8cf5f8a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3258,9 +3258,8 @@
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);
}
}
}