Mercurial > vim
diff src/gui.c @ 2338:da6ec32d8d8f vim73
Added strwidth() and strchars() functions.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 18 Jul 2010 15:31:08 +0200 |
parents | ccda151dde4e |
children | 8878a9f8db87 |
line wrap: on
line diff
--- a/src/gui.c +++ b/src/gui.c @@ -2329,14 +2329,9 @@ gui_outstr_nowrap(s, len, flags, fg, bg, # 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 }