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/search.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/search.c')
-rw-r--r-- | src/nvim/search.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 32bb0cb55a..6c4f17787f 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -386,7 +386,7 @@ bool pat_has_uppercase(char_u *pat) char_u *p = pat; while (*p != NUL) { - const int l = mb_ptr2len(p); + const int l = utfc_ptr2len(p); if (l > 1) { if (mb_isupper(utf_ptr2char(p))) { @@ -797,7 +797,7 @@ int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, Direction dir, // for empty match: advance one char if (matchcol == matchpos.col && ptr[matchcol] != NUL) { - matchcol += mb_ptr2len(ptr + matchcol); + matchcol += utfc_ptr2len(ptr + matchcol); } } else { // Stop when the match is in a next line. @@ -806,7 +806,7 @@ int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, Direction dir, } matchcol = matchpos.col; if (ptr[matchcol] != NUL) { - matchcol += mb_ptr2len(ptr + matchcol); + matchcol += utfc_ptr2len(ptr + matchcol); } } if (ptr[matchcol] == NUL @@ -3955,7 +3955,7 @@ static int find_next_quote(char_u *line, int col, int quotechar, char_u *escape) } else if (c == quotechar) { break; } - col += mb_ptr2len(line + col); + col += utfc_ptr2len(line + col); } return col; } |