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

@@ -3223,7 +3223,7 @@ do_addsub(
while (ptr[col] != NUL
&& !vim_isdigit(ptr[col])
&& !(doalp && ASCII_ISALPHA(ptr[col])))
col += MB_PTR2LEN(ptr + col);
col += mb_ptr2len(ptr + col);
while (col > 0
&& vim_isdigit(ptr[col - 1])
@@ -3242,7 +3242,7 @@ do_addsub(
&& !vim_isdigit(ptr[col])
&& !(doalp && ASCII_ISALPHA(ptr[col])))
{
int mb_len = MB_PTR2LEN(ptr + col);
int mb_len = mb_ptr2len(ptr + col);
col += mb_len;
length -= mb_len;