summaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authornicm <nicm>2021-10-18 09:48:35 +0000
committernicm <nicm>2021-10-18 09:48:35 +0000
commit51ff77d47be80d59b1e30e55bd75788fcc22e4bf (patch)
tree4a0fab23dca1c55e8d82955bfa1bb948c2b795a2 /menu.c
parent2c188ee0c5dbe2633920b0c2a341264335734767 (diff)
Fix menu width containing disabled items, from Alexis Hildebrandt in
GitHub issue 2935.
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c2
1 files changed, 2 insertions, 0 deletions
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;
}