]> granicus.if.org Git - nethack/commitdiff
tty message loss
authorcohrs <cohrs>
Sun, 14 Apr 2002 21:45:33 +0000 (21:45 +0000)
committercohrs <cohrs>
Sun, 14 Apr 2002 21:45:33 +0000 (21:45 +0000)
- typing ESC would lose messages if msg_window was not displayed
- incorporate <Someone>'s fix, which causes them to be tracked, just not
displayed, and thus still available for ^P viewing later on

doc/fixes34.1
win/tty/topl.c
win/tty/wintty.c

index c924e6dd2f67eacf7fa1da9268f93866c0648930..e51a0aa8498da302c40d8e26fd45d4f60d2aece0 100644 (file)
@@ -88,6 +88,7 @@ tty: remove #define DEBUG that forced debug behavior in production builds
 X11: getlin dialog got steadily narrower each time it was used
 unix: install recover command into GAMEDIR by default
 tty: correctly handle an empty TERM environment variable
+tty: don't lose messages when ESC has canceled their display
 
 
 General New Features
index ec38d6ab18add7d9ad412ca53c16e236c9ba5a92..12188b1b1efbaf28bad6673c1881e10b55a4ccb2 100644 (file)
@@ -165,8 +165,7 @@ update_topl(bp)
        /* If there is room on the line, print message on same line */
        /* But messages like "You die..." deserve their own line */
        n0 = strlen(bp);
-       if( (ttyDisplay->toplin == 1 || 
-               (cw->flags & WIN_STOP && iflags.prevmsg_window)) &&
+       if ((ttyDisplay->toplin == 1 || (cw->flags & WIN_STOP)) &&
            cw->cury == 0 &&
            n0 + (int)strlen(toplines) + 3 < CO-8 &&  /* room for --More-- */
            (notdied = strncmp(bp, "You die", 7))) {
@@ -176,7 +175,7 @@ update_topl(bp)
                if(!(cw->flags & WIN_STOP))
                    addtopl(bp);
                return;
-       } else if (!(cw->flags & WIN_STOP && !iflags.prevmsg_window)) {
+       } else if (!(cw->flags & WIN_STOP)) {
            if(ttyDisplay->toplin == 1) more();
            else if(cw->cury) { /* for when flags.toplin == 2 && cury > 1 */
                docorner(1, cw->cury+1); /* reset cury = 0 if redraw screen */
index e5ed37773e9216f3ab60384d276cac349297a855..a9c356f67f6e118ebf8dc97b6821557142c2cef1 100644 (file)
@@ -1745,8 +1745,7 @@ tty_putstr(window, attr, str)
     }
 
     if(str == (const char*)0 ||
-       ( (cw->flags & WIN_CANCELLED) && 
-         (cw->type != NHW_MESSAGE || !iflags.prevmsg_window) ))
+       ((cw->flags & WIN_CANCELLED) && (cw->type != NHW_MESSAGE)))
        return;
     if(cw->type != NHW_MESSAGE)
        str = compress_str(str);