1
0
forked from aniani/vim

patch 8.1.2120: some MB_ macros are more complicated than necessary

Problem:    Some MB_ macros are more complicated than necessary. (Dominique
            Pelle)
Solution:   Simplify the macros.  Expand inline.
This commit is contained in:
Bram Moolenaar
2019-10-06 22:00:13 +02:00
parent 524f3b19ae
commit 1614a14901
18 changed files with 44 additions and 44 deletions

View File

@@ -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();