curses: digit as menu selector

Menus in the curses interface would honor a digit as a selector
character ("letter" :-) for PICK_ANY menus but forced it to start a
count in PICK_ONE menus.  This fixes that, although the menu where I
was using digits as selectors (not included) has been changed to use
letters so this fix isn't being exercised anymore.

Also, add a couple of comments about persistent inventory.
This commit is contained in:
PatR
2023-10-30 16:26:54 -07:00
parent df4d945395
commit f25b5c4627
2 changed files with 37 additions and 9 deletions
+2 -1
View File
@@ -1538,7 +1538,8 @@ menu_get_selections(WINDOW *win, nhmenu *menu, int how)
}
/*FALLTHRU*/
default:
if (isdigit(curletter) && !groupaccels[curletter]) {
if (isdigit(curletter) && !selectors[curletter]
&& !groupaccels[curletter]) {
count = curses_get_count(curletter);
/* after count, we know some non-digit is already pending */
curletter = curses_getch();