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