]> granicus.if.org Git - nethack/commitdiff
tty PICK_NONE menus
authorPatR <rankin@nethack.org>
Sat, 12 Feb 2022 15:28:40 +0000 (07:28 -0800)
committerPatR <rankin@nethack.org>
Sat, 12 Feb 2022 15:28:40 +0000 (07:28 -0800)
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.

doc/fixes3-7-0.txt
win/tty/wintty.c

index 52e16cc584f47e6f64e7d9e7cbe680e93834870b..52ca674d81918c4fbf0e8364744e981880c63658 100644 (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
        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
+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
        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)
index dc8c1870773c4b2233d2ec575db586ef2e84e942..534c3b2c431809d39e45199866a7b0b1a0ad7479 100644 (file)
@@ -2103,12 +2103,8 @@ process_menu_window(winid window, struct WinDesc *cw)
         case '\0': /* finished (commit) */
         case '\n':
         case '\r':
-            /* only finished if we are actually picking something */
-            if (cw->how != PICK_NONE) {
-                finished = TRUE;
-                break;
-            }
-        /* else fall through */
+            finished = TRUE;
+            break;
         case ' ':
         case MENU_NEXT_PAGE:
             if (cw->npages > 0 && curr_page != cw->npages - 1) {