0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -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

@@ -2329,14 +2329,9 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
# ifdef FEAT_MBYTE
if (enc_dbcs == DBCS_JPNU)
{
int clen = 0;
int i;
/* Get the length in display cells, this can be different from the
* number of bytes for "euc-jp". */
for (i = 0; i < len; i += (*mb_ptr2len)(s + i))
clen += (*mb_ptr2cells)(s + i);
len = clen;
len = mb_string2cells(s, len);
}
# endif
}