menu: fix non-matched accelerators triggering exec

This commit is contained in:
Alex Chernika 2026-04-10 19:28:38 +02:00
parent 7575623db8
commit 9108809578
No known key found for this signature in database
GPG key ID: 6029FAD8ABFB076A

View file

@ -1507,15 +1507,12 @@ menu_item_select_by_accelerator(char accelerator)
if (next_selection) {
menu_process_item_selection(next_selection);
if (needs_exec && next_selection->submenu) {
/*
* Submenu was opened, select the first menuitem
* without executing
*/
/* Since we can't execute a submenu, enter it instead. */
needs_exec = false;
menu_submenu_enter();
}
}
return needs_exec;
return matched && needs_exec;
}
bool