Restoring a game can return to the wishing prompt
In TTY or curses, if the terminal goes away while you're in the wishing prompt, return to the prompt when the game is restored. Breaks saves.
This commit is contained in:
@@ -83,6 +83,8 @@ hooked_tty_getlin(
|
||||
c = pgetchar();
|
||||
term_curs_set(0);
|
||||
if (c == '\033' || c == EOF) {
|
||||
if (c == EOF)
|
||||
iflags.term_gone = 1;
|
||||
if (c == '\033' && obufp[0] != '\0') {
|
||||
obufp[0] = '\0';
|
||||
bufp = obufp;
|
||||
|
||||
@@ -4090,8 +4090,10 @@ tty_nhgetch(void)
|
||||
term_curs_set(0);
|
||||
if (!i)
|
||||
i = '\033'; /* map NUL to ESC since nethack doesn't expect NUL */
|
||||
else if (i == EOF)
|
||||
else if (i == EOF) {
|
||||
iflags.term_gone = 1;
|
||||
i = '\033'; /* same for EOF */
|
||||
}
|
||||
/* topline has been seen - we can clear the need for --More-- */
|
||||
if (ttyDisplay && ttyDisplay->toplin == TOPLINE_NEED_MORE)
|
||||
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
|
||||
|
||||
Reference in New Issue
Block a user