Curses: prevent menu search without menu options
First noticed this when watching someone livestream, and managed
to figure it out from there: The window that pops up when looking
at a pile of objects under you by pressing ':' is marked as a menu,
but has no selectable options. Curses still allowed you to use the
menu-search command (':') on it.
Prevent the menu search command in windows with no selectable entries.
This commit is contained in:
@@ -1444,6 +1444,9 @@ curs_nonselect_menu_action(
|
||||
case MENU_SEARCH: {
|
||||
char search_key[BUFSZ];
|
||||
|
||||
if (how == PICK_NONE)
|
||||
break;
|
||||
|
||||
search_key[0] = '\0';
|
||||
curses_line_input_dialog("Search for:", search_key, BUFSZ);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user