summaryrefslogtreecommitdiff
path: root/src/screen.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/screen.c
parent9855d6b3610b3ae46a5522b9f8e1e4b521759e83 (diff)
downloadvim-git-72597a57b526a8df333e77ef8a837b595baa18c7.tar.gz
Added strwidth() and strchars() functions.
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c
index 5b9a0737f..74898f82d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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;