]> granicus.if.org Git - nethack/commitdiff
tty: msg_window display anomaly
authorcohrs <cohrs>
Sun, 3 Feb 2002 07:46:05 +0000 (07:46 +0000)
committercohrs <cohrs>
Sun, 3 Feb 2002 07:46:05 +0000 (07:46 +0000)
If you interrupt nethack (^C) in tty windowport mode while a pompt is
displayed and and msg_window=true, it can display the full message history
at an unexpected time.  Detect this and display only the topl, as expected.

win/tty/topl.c
win/tty/wintty.c

index 02d0df0291f26786fef9011d2f0bdab4a60a2ca8..1d11d90be61b22eae788726240187765139cd9cf 100644 (file)
@@ -29,7 +29,7 @@ tty_doprev_message()
     winid prevmsg_win;
     int i;
 
-    if (iflags.prevmsg_window) {
+    if (iflags.prevmsg_window && !ttyDisplay->inread) {
        prevmsg_win = create_nhwindow(NHW_MENU);
        putstr(prevmsg_win, 0, "Message History");
        putstr(prevmsg_win, 0, "");
index 842bf1d4bd64c069a9b1399033b72f4454df5469..64e659dc669ef6b8b0d2c90f63c1da2e50da63a8 100644 (file)
@@ -2222,8 +2222,7 @@ tty_wait_synch()
            /* this can only happen if we were reading and got interrupted */
            ttyDisplay->toplin = 3;
            /* do this twice; 1st time gets the Quit? message again */
-           if (!iflags.prevmsg_window)
-               (void) tty_doprev_message();
+           (void) tty_doprev_message();
            (void) tty_doprev_message();
            ttyDisplay->intr++;
            (void) fflush(stdout);