Fix menu width containing disabled items, from Alexis Hildebrandt in

GitHub issue 2935.
pull/2936/head
nicm 2021-10-18 09:48:35 +00:00
parent 2c188ee0c5
commit 51ff77d47b
1 changed files with 2 additions and 0 deletions

2
menu.c
View File

@ -100,6 +100,8 @@ menu_add_item(struct menu *menu, const struct menu_item *item,
new_item->key = item->key;
width = format_width(new_item->name);
if (*new_item->name == '-')
width--;
if (width > menu->width)
menu->width = width;
}