From 2ceb1c74d591a07183ee02baf6ff1e205c87c6b8 Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Wed, 14 Jan 2015 13:59:17 +0100 Subject: Remove long_u: regexp: Refactor long_u. --- src/nvim/charset.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/nvim/charset.c') diff --git a/src/nvim/charset.c b/src/nvim/charset.c index b86c66c3fe..86d6acc60b 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -791,15 +791,17 @@ int linetabsize_col(int startcol, char_u *s) /// @param len /// /// @return Number of characters the string will take on the screen. -int win_linetabsize(win_T *wp, char_u *line, colnr_T len) +unsigned int win_linetabsize(win_T *wp, char_u *line, colnr_T len) { colnr_T col = 0; - char_u *s; - for (s = line; *s != NUL && (len == MAXCOL || s < line + len); mb_ptr_adv(s)) { + for (char_u *s = line; + *s != NUL && (len == MAXCOL || s < line + len); + mb_ptr_adv(s)) { col += win_lbr_chartabsize(wp, line, s, col, NULL); } - return (int)col; + + return (unsigned int)col; } /// Return TRUE if 'c' is a normal identifier character: -- cgit