summaryrefslogtreecommitdiff
path: root/src/popupmenu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-06 22:00:13 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-06 22:00:13 +0200
commit1614a14901558ca091329315d14a7d5e1b53aa47 (patch)
tree324ceeba0f8d5bda2f270b591a1beeed8e74125d /src/popupmenu.c
parent524f3b19ae16e08350010b5effe38d0637349285 (diff)
downloadvim-git-1614a14901558ca091329315d14a7d5e1b53aa47.tar.gz
patch 8.1.2120: some MB_ macros are more complicated than necessaryv8.1.2120
Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline.
Diffstat (limited to 'src/popupmenu.c')
-rw-r--r--src/popupmenu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/popupmenu.c b/src/popupmenu.c
index 846dbc264..b88c6531c 100644
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -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);