From 51ff77d47be80d59b1e30e55bd75788fcc22e4bf Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 18 Oct 2021 09:48:35 +0000 Subject: [PATCH] Fix menu width containing disabled items, from Alexis Hildebrandt in GitHub issue 2935. --- menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/menu.c b/menu.c index 4c6403a0..a1c81816 100644 --- a/menu.c +++ b/menu.c @@ -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; }