diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 12:48:42 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 12:49:12 +0100 |
commit | 71a4d275dc3fa71c656c0d2423f60904822aa223 (patch) | |
tree | f174ef804f0b61fd1af817a6ad01c9f76a2c1875 /src/nvim/ops.c | |
parent | 0039ba04b0c907a6d23a0c07ed272f38c58c9739 (diff) | |
download | rneovim-71a4d275dc3fa71c656c0d2423f60904822aa223.tar.gz rneovim-71a4d275dc3fa71c656c0d2423f60904822aa223.tar.bz2 rneovim-71a4d275dc3fa71c656c0d2423f60904822aa223.zip |
refactor(multibyte): eliminate mb_char2len alias for utf_char2len
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 942dc4d8af..7d7db2a8a6 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -1847,7 +1847,7 @@ int op_replace(oparg_T *oap, int c) // Compute bytes needed, move character count to num_chars. num_chars = numc; - numc *= (*mb_char2len)(c); + numc *= utf_char2len(c); oldp = get_cursor_line_ptr(); oldlen = (int)STRLEN(oldp); @@ -1926,11 +1926,11 @@ int op_replace(oparg_T *oap, int c) while (ltoreq(curwin->w_cursor, oap->end)) { n = gchar_cursor(); if (n != NUL) { - if ((*mb_char2len)(c) > 1 || (*mb_char2len)(n) > 1) { + if (utf_char2len(c) > 1 || utf_char2len(n) > 1) { // This is slow, but it handles replacing a single-byte // with a multi-byte and the other way around. if (curwin->w_cursor.lnum == oap->end.lnum) { - oap->end.col += (*mb_char2len)(c) - (*mb_char2len)(n); + oap->end.col += utf_char2len(c) - utf_char2len(n); } replace_character(c); } else { |