0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

Added strwidth() and strchars() functions.

This commit is contained in:
Bram Moolenaar
2010-07-18 15:31:08 +02:00
parent 9855d6b361
commit 72597a57b5
10 changed files with 99 additions and 42 deletions

View File

@@ -6168,8 +6168,8 @@ win_redr_status(wp)
int clen = 0, i;
/* Count total number of display cells. */
for (i = 0; p[i] != NUL; i += (*mb_ptr2len)(p + i))
clen += (*mb_ptr2cells)(p + i);
clen = mb_string2cells(p, -1);
/* Find first character that will fit.
* Going from start to end is much faster for DBCS. */
for (i = 0; p[i] != NUL && clen >= this_ru_col - 1;