tty PICK_NONE menus

When testing the menu/incomplete map situation I noticed that <return>
didn't work to dismiss the "list autopickup exceptions" menu.  <space>
or <escape> was required.  That was clearly intentional but doesn't
seem reasonable.  Make <return> behave the same for PICK_NONE as it
does for other menu modes in tty and as it does for other interfaces.
This commit is contained in:
PatR
2022-02-12 07:28:40 -08:00
parent 87f08dbeba
commit c862f2a9ca
2 changed files with 4 additions and 6 deletions

View File

@@ -1214,6 +1214,8 @@ tty: '$' can now select gold in a menu even when it isn't on current page
tty: if a menu used full screen and brought up another menu that wasn't full tty: if a menu used full screen and brought up another menu that wasn't full
screen, sometimes only a small border of background was drawn around screen, sometimes only a small border of background was drawn around
it with most of the map left blank until after the menu was dismissed it with most of the map left blank until after the menu was dismissed
tty: have <return> dismiss pick-none menus instead of acting like '>' (not
only wouldn't dismiss when not on last page, wouldn't dismiss at all)
Unix: when user name is used as default character name, keep hyphenated value Unix: when user name is used as default character name, keep hyphenated value
intact instead stripping off dash and whatever follows as if that intact instead stripping off dash and whatever follows as if that
specified role/race/&c (worked once upon a time; broken since 3.3.0) specified role/race/&c (worked once upon a time; broken since 3.3.0)

View File

@@ -2103,12 +2103,8 @@ process_menu_window(winid window, struct WinDesc *cw)
case '\0': /* finished (commit) */ case '\0': /* finished (commit) */
case '\n': case '\n':
case '\r': case '\r':
/* only finished if we are actually picking something */ finished = TRUE;
if (cw->how != PICK_NONE) { break;
finished = TRUE;
break;
}
/* else fall through */
case ' ': case ' ':
case MENU_NEXT_PAGE: case MENU_NEXT_PAGE:
if (cw->npages > 0 && curr_page != cw->npages - 1) { if (cw->npages > 0 && curr_page != cw->npages - 1) {