summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-06 22:00:13 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-06 22:00:13 +0200
commit1614a14901558ca091329315d14a7d5e1b53aa47 (patch)
tree324ceeba0f8d5bda2f270b591a1beeed8e74125d /src/search.c
parent524f3b19ae16e08350010b5effe38d0637349285 (diff)
downloadvim-git-1614a14901558ca091329315d14a7d5e1b53aa47.tar.gz
patch 8.1.2120: some MB_ macros are more complicated than necessaryv8.1.2120
Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline.
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/search.c b/src/search.c
index 63171a92c..a0ca8df62 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2078,7 +2078,7 @@ findmatchlimit(
find_mps_values(&initc, &findc, &backwards, FALSE);
if (findc)
break;
- pos.col += MB_PTR2LEN(linep + pos.col);
+ pos.col += mb_ptr2len(linep + pos.col);
}
if (!findc)
{
@@ -2657,14 +2657,14 @@ showmatch(
if (PTR2CHAR(p) == c && (curwin->w_p_rl ^ p_ri))
break;
#endif
- p += MB_PTR2LEN(p) + 1;
+ p += mb_ptr2len(p) + 1;
if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT
&& !(curwin->w_p_rl ^ p_ri)
#endif
)
break;
- p += MB_PTR2LEN(p);
+ p += mb_ptr2len(p);
if (*p == NUL)
return;
}
@@ -5633,7 +5633,7 @@ exit_matched:
&& action == ACTION_EXPAND
&& !(compl_cont_status & CONT_SOL)
&& *startp != NUL
- && *(p = startp + MB_PTR2LEN(startp)) != NUL)
+ && *(p = startp + mb_ptr2len(startp)) != NUL)
goto search_line;
}
line_breakcheck();