diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 13:44:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-14 13:44:18 +0100 |
commit | 27f8b04f1791c29825bbe4b10e4a8db9472ecaee (patch) | |
tree | 1d8e2cd43baaca7f94ca08689b11231a128ec7cc /src/nvim/normal.c | |
parent | ee3a58d42e7fce666eef570db6f2944c29303d98 (diff) | |
parent | 71a4d275dc3fa71c656c0d2423f60904822aa223 (diff) | |
download | rneovim-27f8b04f1791c29825bbe4b10e4a8db9472ecaee.tar.gz rneovim-27f8b04f1791c29825bbe4b10e4a8db9472ecaee.tar.bz2 rneovim-27f8b04f1791c29825bbe4b10e4a8db9472ecaee.zip |
Merge pull request #16315 from bfredl/multibytes
refactor(multibyte): eliminate mb_* aliases for utf_* functions
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 6f1cc494b2..1effeefd32 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -2931,7 +2931,7 @@ bool do_mouse(oparg_T *oap, int c, int dir, long count, bool fixindent) find_start_of_word(&VIsual); if (*p_sel == 'e' && *get_cursor_pos_ptr() != NUL) { curwin->w_cursor.col += - (*mb_ptr2len)(get_cursor_pos_ptr()); + utfc_ptr2len(get_cursor_pos_ptr()); } find_end_of_word(&curwin->w_cursor); } @@ -2998,7 +2998,7 @@ static void find_end_of_word(pos_T *pos) } cclass = get_mouse_class(line + pos->col); while (line[pos->col] != NUL) { - col = pos->col + (*mb_ptr2len)(line + pos->col); + col = pos->col + utfc_ptr2len(line + pos->col); if (get_mouse_class(line + col) != cclass) { if (*p_sel == 'e') { pos->col = col; @@ -3437,7 +3437,7 @@ void clear_showcmd(void) e = ml_get_pos(&VIsual); } while ((*p_sel != 'e') ? s <= e : s < e) { - l = (*mb_ptr2len)(s); + l = utfc_ptr2len(s); if (l == 0) { ++bytes; ++chars; @@ -5382,7 +5382,7 @@ static void nv_right(cmdarg_T *cap) if (virtual_active()) { oneright(); } else { - curwin->w_cursor.col += (*mb_ptr2len)(get_cursor_pos_ptr()); + curwin->w_cursor.col += utfc_ptr2len(get_cursor_pos_ptr()); } } } |