summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-18 15:31:08 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-18 15:31:08 +0200
commit72597a57b526a8df333e77ef8a837b595baa18c7 (patch)
tree8b635e3dbb23f92a0a73b730cc79bc538c0b61b9 /src/gui.c
parent9855d6b3610b3ae46a5522b9f8e1e4b521759e83 (diff)
Added strwidth() and strchars() functions.
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui.c b/src/gui.c
index 4075997f01..68999926f6 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -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
}