diff --git a/win/tty/getline.c b/win/tty/getline.c index 3bee369c3..aa88d8a8d 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -73,7 +73,10 @@ getlin_hook_proc hook; } if(c == '\020') { /* ctrl-P */ if (iflags.prevmsg_window) { + int sav = ttyDisplay->inread; + ttyDisplay->inread = 0; (void) tty_doprev_message(); + ttyDisplay->inread = sav; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; addtopl(query); diff --git a/win/tty/topl.c b/win/tty/topl.c index 1d11d90be..aa7931756 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -300,12 +300,16 @@ char def; q = lowc(readchar()); if (q == '\020') { /* ctrl-P */ if (iflags.prevmsg_window) { + int sav = ttyDisplay->inread; + ttyDisplay->inread = 0; (void) tty_doprev_message(); + ttyDisplay->inread = sav; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; addtopl(prompt); } else { - if(!doprev) (void) tty_doprev_message(); /* need two initially */ + if(!doprev) + (void) tty_doprev_message(); /* need two initially */ (void) tty_doprev_message(); doprev = 1; } diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 64e659dc6..7d1f4cba4 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -2218,7 +2218,7 @@ tty_wait_synch() if(ttyDisplay->inmore) { addtopl("--More--"); (void) fflush(stdout); - } else if(ttyDisplay->inread) { + } else if(ttyDisplay->inread > program_state.gameover) { /* this can only happen if we were reading and got interrupted */ ttyDisplay->toplin = 3; /* do this twice; 1st time gets the Quit? message again */