vim-patch:7.4.2051

Problem:    No proper testing of trunc_string().
Solution:   Add a unittest for message.c.

502ae4ba63
This commit is contained in:
James McCoy
2017-03-06 10:44:07 -05:00
parent 483e8257e5
commit 7217360e34
4 changed files with 60 additions and 11 deletions

View File

@@ -257,7 +257,7 @@ void trunc_string(char_u *s, char_u *buf, int room, int buflen)
return;
}
n = ptr2cells(s + e);
if (len + n >= half)
if (len + n > half)
break;
len += n;
buf[e] = s[e];