aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 085f12473e..82c74a00c5 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -1561,7 +1561,7 @@ void display_dollar(colnr_T col)
/* If on the last byte of a multi-byte move to the first byte. */
p = get_cursor_line_ptr();
- curwin->w_cursor.col -= (*mb_head_off)(p, p + col);
+ curwin->w_cursor.col -= utf_head_off(p, p + col);
}
curs_columns(FALSE); /* recompute w_wrow and w_wcol */
if (curwin->w_wcol < curwin->w_width) {
@@ -3451,7 +3451,7 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len)
;
if (len > 0)
- len -= (*mb_head_off)(p, p + len);
+ len -= utf_head_off(p, p + len);
for (p += len; *p != NUL; MB_PTR_ADV(p)) {
AppendCharToRedobuff(K_BS);
}
@@ -4593,10 +4593,10 @@ static int ins_complete(int c, bool enable_pum)
int base_class;
int head_off;
- startcol -= (*mb_head_off)(line, line + startcol);
+ startcol -= utf_head_off(line, line + startcol);
base_class = mb_get_class(line + startcol);
while (--startcol >= 0) {
- head_off = (*mb_head_off)(line, line + startcol);
+ head_off = utf_head_off(line, line + startcol);
if (base_class != mb_get_class(line + startcol
- head_off))
break;