mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 10:08:48 +00:00
Do not allow disabled items to be selected.
This commit is contained in:
parent
8e1d28453d
commit
9726c4454e
5
menu.c
5
menu.c
@ -315,10 +315,11 @@ chosen:
|
||||
if (md->choice == -1)
|
||||
return (1);
|
||||
item = &menu->items[md->choice];
|
||||
if ((md->flags & MENU_STAYOPEN) && item->name == NULL)
|
||||
if (item->name == NULL || *item->name == '-') {
|
||||
if (md->flags & MENU_STAYOPEN)
|
||||
return (0);
|
||||
if (item->name == NULL || *item->name == '-')
|
||||
return (1);
|
||||
}
|
||||
if (md->cb != NULL) {
|
||||
md->cb(md->menu, md->choice, item->key, md->data);
|
||||
md->cb = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user