mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-16 00:13:00 +00:00
[ncmenu_mouse_selected] don't return disabled items #2582
This commit is contained in:
parent
9647e49cba
commit
6bd7f755f6
@ -672,6 +672,9 @@ const char* ncmenu_mouse_selected(const ncmenu* n, const ncinput* click,
|
||||
return NULL;
|
||||
}
|
||||
const int itemidx = y - 2;
|
||||
if(sec->items[itemidx].disabled){
|
||||
return NULL;
|
||||
}
|
||||
if(ni){
|
||||
memcpy(ni, &sec->items[itemidx].shortcut, sizeof(*ni));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user