mirror of
https://github.com/tmux/tmux.git
synced 2024-12-25 02:48:47 +00:00
Fix menu width containing disabled items, from Alexis Hildebrandt in
GitHub issue 2935.
This commit is contained in:
parent
2c188ee0c5
commit
51ff77d47b
2
menu.c
2
menu.c
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user