Fix menu width containing disabled items, from Alexis Hildebrandt in

GitHub issue 2935.
This commit is contained in:
nicm 2021-10-18 09:48:35 +00:00
parent 2c188ee0c5
commit 51ff77d47b

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; new_item->key = item->key;
width = format_width(new_item->name); width = format_width(new_item->name);
if (*new_item->name == '-')
width--;
if (width > menu->width) if (width > menu->width)
menu->width = width; menu->width = width;
} }