diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 12:40:46 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 12:49:12 +0100 |
commit | 0039ba04b0c907a6d23a0c07ed272f38c58c9739 (patch) | |
tree | 79b2dd9535e52d819fbddf2d02f3aff0db2ccc34 /src/nvim/ops.c | |
parent | 9f27e6cbe70643e7b26e0b4f024fad3f75b1950c (diff) | |
download | rneovim-0039ba04b0c907a6d23a0c07ed272f38c58c9739.tar.gz rneovim-0039ba04b0c907a6d23a0c07ed272f38c58c9739.tar.bz2 rneovim-0039ba04b0c907a6d23a0c07ed272f38c58c9739.zip |
refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 10 |
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) { |