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.
diff --git a/src/popupmenu.c b/src/popupmenu.c
index 846dbc2..b88c653 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -1151,7 +1151,7 @@
}
}
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 @@
{
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);