aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 85c0d7eb48..1f382d31c5 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -681,7 +681,7 @@ int searchit(
}
if (matchcol == matchpos.col && ptr[matchcol] != NUL) {
- matchcol += MB_PTR2LEN(ptr + matchcol);
+ matchcol += utfc_ptr2len(ptr + matchcol);
}
if (matchcol == 0 && (options & SEARCH_START)) {
@@ -1755,7 +1755,7 @@ pos_T *findmatchlimit(oparg_T *oap, int initc, int flags, int64_t maxtravel)
find_mps_values(&initc, &findc, &backwards, FALSE);
if (findc)
break;
- pos.col += MB_PTR2LEN(linep + pos.col);
+ pos.col += utfc_ptr2len(linep + pos.col);
}
if (!findc) {
/* no brace in the line, maybe use " #if" then */
@@ -2234,14 +2234,14 @@ showmatch(
for (p = curbuf->b_p_mps; *p != NUL; ++p) {
if (PTR2CHAR(p) == c && (curwin->w_p_rl ^ p_ri))
break;
- p += MB_PTR2LEN(p) + 1;
- if (PTR2CHAR(p) == c
- && !(curwin->w_p_rl ^ p_ri)
- )
+ p += utfc_ptr2len(p) + 1;
+ if (PTR2CHAR(p) == c && !(curwin->w_p_rl ^ p_ri)) {
break;
- p += MB_PTR2LEN(p);
- if (*p == NUL)
+ }
+ p += utfc_ptr2len(p);
+ if (*p == NUL) {
return;
+ }
}
if ((lpos = findmatch(NULL, NUL)) == NULL) { // no match, so beep
@@ -4845,7 +4845,7 @@ exit_matched:
&& action == ACTION_EXPAND
&& !(compl_cont_status & CONT_SOL)
&& *startp != NUL
- && *(p = startp + MB_PTR2LEN(startp)) != NUL)
+ && *(p = startp + utfc_ptr2len(startp)) != NUL)
goto search_line;
}
line_breakcheck();