From 697ef9760c2481224a8198f11c0993945a86f93b Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 5 Apr 2023 19:48:23 +0300 Subject: [PATCH] Curses: partial stack unselecting In curses, selecting a partial stack, then unselecting the entry, and then selecting it normally, the entry still kept the quantity from the partial selection. Make it behave like all the other windowports by resetting the quantity when the entry is unselected. --- doc/fixes3-7-0.txt | 2 ++ win/curses/cursdial.c | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 0690b5d7d..37f5715f6 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1636,6 +1636,8 @@ curses: ensure alt+'A' through alt+'Z' and alt+'a' through alt+'z' work correctly with PDCURSES curses: fix an off-by-one error when deciding whether a long line on the bottom line of the message window can fit ">>" (curses' "--More--") +curses: selecting a partial stack, unselecting it, and then selecting it + normally did not reset the quantity to the whole stack macOS: Xcode project was failing to build if the path to the NetHack source tree contained a space; the issue was within some shell script code contained within the project diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index 2b1615270..0235e3839 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -1636,6 +1636,7 @@ menu_select_deselect( if (operation == DESELECT || (item->selected && operation == INVERT)) { item->selected = FALSE; + item->count = -1L; if (visible) { mvwaddch(win, item->line_num + 1, 1, ' '); curses_toggle_color_attr(win, HIGHLIGHT_COLOR, NONE, ON);