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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user