0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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

@@ -1151,7 +1151,7 @@ split_message(char_u *mesg, pumitem_T **array)
}
}
item->cells += ptr2cells(p);
p += MB_PTR2LEN(p);
p += mb_ptr2len(p);
}
item->bytelen = p - item->start;
if (item->cells > max_cells)
@@ -1195,7 +1195,7 @@ split_message(char_u *mesg, pumitem_T **array)
{
cells = item->indent * 2;
for (p = item->start + skip; p < item->start + item->bytelen;
p += MB_PTR2LEN(p))
p += mb_ptr2len(p))
if ((cells += ptr2cells(p)) > BALLOON_MIN_WIDTH)
break;
thislen = p - (item->start + skip);