aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index e072bc58cb..942dc4d8af 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2939,7 +2939,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
bool one_past_line = (*cursor_pos == NUL);
bool eol = false;
if (!one_past_line) {
- eol = (*(cursor_pos + mb_ptr2len(cursor_pos)) == NUL);
+ eol = (*(cursor_pos + utfc_ptr2len(cursor_pos)) == NUL);
}
bool ve_allows = (ve_flags == VE_ALL || ve_flags == VE_ONEMORE);
@@ -3317,7 +3317,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
// if type is kMTCharWise, FORWARD is the same as BACKWARD on the next
// char
if (dir == FORWARD && gchar_cursor() != NUL) {
- int bytelen = (*mb_ptr2len)(get_cursor_pos_ptr());
+ int bytelen = utfc_ptr2len(get_cursor_pos_ptr());
// put it on the next of the multi-byte character.
col += bytelen;
@@ -3703,7 +3703,7 @@ void ex_display(exarg_T *eap)
n -= 2;
}
for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; p++) { // -V1019 NOLINT(whitespace/line_length)
- clen = (*mb_ptr2len)(p);
+ clen = utfc_ptr2len(p);
msg_outtrans_len(p, clen);
p += clen - 1;
}
@@ -5640,8 +5640,8 @@ static varnumber_T line_count_info(char_u *line, varnumber_T *wc, varnumber_T *c
} else if (!ascii_isspace(line[i])) {
is_word = 1;
}
- ++chars;
- i += (*mb_ptr2len)(line + i);
+ chars++;
+ i += utfc_ptr2len(line + i);
}
if (is_word) {