-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.293 $ $NHDT-Date: 1554045807 2019/03/31 15:23:27 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.294 $ $NHDT-Date: 1554071680 2019/03/31 22:34:40 $
This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however,
curses: preserve ^P message history across save/restore
curses: highlighting of status conditions was broken by the fix for timing out
of temporary highlights setting off unnecessary status updates
+curses: if player pressed ESC at More>> prompt to suppress remaining messages
+ for the current move and then hero got another move on the same turn,
+ messages and most prompts would stay suppressed during that extra move
vms: add compile of isaac64.c to Makefile.src and vmsbuild.com
vms+curses: add compile support but it is known to fail to build
#define strncasecmp strncmpi
#endif
+extern long curs_mesg_suppress_turn; /* from cursmesg.c */
+
/*
* Note:
*
int height = prompt_height;
char input[BUFSZ];
+ /* if messages were being suppressed for the remainder of the turn,
+ re-activate them now that input is being requested */
+ curs_mesg_suppress_turn = -1;
+
if (buffer >= (int) sizeof input)
buffer = (int) sizeof input - 1;
maxwidth = term_cols - 2;
boolean any_choice = FALSE;
boolean accept_count = FALSE;
+ /* if messages were being suppressed for the remainder of the turn,
+ re-activate them now that input is being requested */
+ curs_mesg_suppress_turn = -1;
+
if (invent || (moves > 1)) {
curses_get_window_size(MAP_WIN, &map_height, &map_width);
} else {
#include "cursmesg.h"
#include <ctype.h>
+/* player can type ESC at More>> prompt to avoid seeing more messages
+ for the current move; but hero might get more than one move per turn,
+ so the input routines need to be able to cancel this */
+long curs_mesg_suppress_turn = -1; /* also used in cursdial.c && cursmain.c */
/* Message window routines for curses interface */
boolean border = curses_window_has_border(MESSAGE_WIN);
int message_length = strlen(message);
int border_space = 0;
- static long suppress_turn = -1;
-#if 1
+#if 0
/*
- * Handled by core's use of putstr(WIN_MESSAGE,ATR_NOHISTORY,message)
- * for intermediate counts, but get_count() also uses putmsghistory()
- * for the final count, to remember that without showing it. But
- * curses is using genl_putmsghistory() which just delivers the text
- * via a normal pline(). This hides that at cost of not having it
- * in ^P recall and being out of sync with DUMPLOG's message history.
+ * This was useful when curses used genl_putmsghistory() but is not
+ * needed now that it has its own curses_putmsghistory() that's
+ * capable of putting something into the ^P recall history without
+ * displaying it at the same time.
*/
if (strncmp("Count:", message, 6) == 0) {
curses_count_window(message);
}
#endif
- if (suppress_turn == moves) {
- return;
+ if (curs_mesg_suppress_turn == moves) {
+ return; /* user has typed ESC to avoid seeing remaining messages. */
}
curses_get_window_size(MESSAGE_WIN, &height, &width);
/* Pause until key is hit - Esc suppresses any further
messages that turn */
if (curses_more() == '\033') {
- suppress_turn = moves;
+ curs_mesg_suppress_turn = moves;
return;
}
} else {
WINDOW *win = curses_get_nhwin(MESSAGE_WIN);
const char *resp = " \r\n\033"; /* space, enter, esc */
+ /* if messages are being suppressed, reenable them */
+ curs_mesg_suppress_turn = -1;
+
curses_get_window_size(MESSAGE_WIN, &height, &width);
curses_toggle_color_attr(win, MORECOLOR, NONE, ON);
mvwprintw(win, my, mx, ">>");