-$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.3 $ $NHDT-Date: 1558045586 2019/05/16 22:26:26 $
+$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.5 $ $NHDT-Date: 1558171542 2019/05/18 09:25:42 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
curses: very tall menus tried to use selector characters a-z, A-Z, and 0-9,
but 0-9 should be reserved for counts and if the display was tall
enough for more than 62 entries, arbitrary ASCII punctuation got used
+curses: when all available lines in the message window are in use,
+ autodescribe feedback for 'pick a position with cursor' overwrote
+ the last line (usually the 'pick a position' prompt/hint), sometimes
+ leaving part of longer underlying line's text visible
+curses: if message window is only one line, cancelling some prompts with ESC
+ left the prompts visible on the message line instead of erasing them
Windows: some startup error messages were not being delivered successfully
/* misleadingly named; represents number of lines delivered since
player was sure to have had a chance to read them; if player
- has just given input then there aren't any such lines right;
+ has just given input then there aren't any such lines right now;
that includes responding to More>> even though it stays same turn */
turn_lines = 0;
}
curses_count_window(const char *count_text)
{
static WINDOW *countwin = NULL;
- int startx, starty, winx, winy;
- int messageh, messagew;
+ int winx, winy;
+ int messageh, messagew, border;
if (!count_text) {
if (countwin)
counting = FALSE;
return;
}
- counting = TRUE;
+ /* position of message window, not current position within message window
+ (so <0,0> for align_message:Top but will vary for other alignings) */
curses_get_window_xy(MESSAGE_WIN, &winx, &winy);
+ /* size of message window, with space for borders already subtracted */
curses_get_window_size(MESSAGE_WIN, &messageh, &messagew);
- if (curses_window_has_border(MESSAGE_WIN)) {
- winx++;
- winy++;
- }
+ /* decide where to put the one-line counting window */
+ border = curses_window_has_border(MESSAGE_WIN) ? 1 : 0;
+ winx += border; /* first writeable message column */
+ winy += border + (messageh - 1); /* last writable message line */
- winy += messageh - 1;
+ /* if most recent message (probably prompt leading to this instance of
+ counting window) is going to be covered up, scroll mesgs up a line */
+ if (!counting && my + 1 >= border + messageh) {
+ scroll_window(MESSAGE_WIN);
+ /* last position within the message window */
+ my = border + (messageh - 1) - 1;
+ mx = border;
+ /* wmove(curses_get_nhwin(MESSAGE_WIN), my, mx); -- not needed */
+ }
+ counting = TRUE;
#ifdef PDCURSES
if (countwin)
but not for dolook's autodescribe when it refers to a named monster */
if (!countwin)
countwin = newwin(1, messagew, winy, winx);
- startx = 0;
- starty = 0;
+ werase(countwin);
- mvwprintw(countwin, starty, startx, "%s", count_text);
+ mvwprintw(countwin, 0, 0, "%s", count_text);
wrefresh(countwin);
}