tty message loss
- 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
This commit is contained in:
@@ -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
|
X11: getlin dialog got steadily narrower each time it was used
|
||||||
unix: install recover command into GAMEDIR by default
|
unix: install recover command into GAMEDIR by default
|
||||||
tty: correctly handle an empty TERM environment variable
|
tty: correctly handle an empty TERM environment variable
|
||||||
|
tty: don't lose messages when ESC has canceled their display
|
||||||
|
|
||||||
|
|
||||||
General New Features
|
General New Features
|
||||||
|
|||||||
@@ -165,8 +165,7 @@ update_topl(bp)
|
|||||||
/* If there is room on the line, print message on same line */
|
/* If there is room on the line, print message on same line */
|
||||||
/* But messages like "You die..." deserve their own line */
|
/* But messages like "You die..." deserve their own line */
|
||||||
n0 = strlen(bp);
|
n0 = strlen(bp);
|
||||||
if( (ttyDisplay->toplin == 1 ||
|
if ((ttyDisplay->toplin == 1 || (cw->flags & WIN_STOP)) &&
|
||||||
(cw->flags & WIN_STOP && iflags.prevmsg_window)) &&
|
|
||||||
cw->cury == 0 &&
|
cw->cury == 0 &&
|
||||||
n0 + (int)strlen(toplines) + 3 < CO-8 && /* room for --More-- */
|
n0 + (int)strlen(toplines) + 3 < CO-8 && /* room for --More-- */
|
||||||
(notdied = strncmp(bp, "You die", 7))) {
|
(notdied = strncmp(bp, "You die", 7))) {
|
||||||
@@ -176,7 +175,7 @@ update_topl(bp)
|
|||||||
if(!(cw->flags & WIN_STOP))
|
if(!(cw->flags & WIN_STOP))
|
||||||
addtopl(bp);
|
addtopl(bp);
|
||||||
return;
|
return;
|
||||||
} else if (!(cw->flags & WIN_STOP && !iflags.prevmsg_window)) {
|
} else if (!(cw->flags & WIN_STOP)) {
|
||||||
if(ttyDisplay->toplin == 1) more();
|
if(ttyDisplay->toplin == 1) more();
|
||||||
else if(cw->cury) { /* for when flags.toplin == 2 && cury > 1 */
|
else if(cw->cury) { /* for when flags.toplin == 2 && cury > 1 */
|
||||||
docorner(1, cw->cury+1); /* reset cury = 0 if redraw screen */
|
docorner(1, cw->cury+1); /* reset cury = 0 if redraw screen */
|
||||||
|
|||||||
@@ -1745,8 +1745,7 @@ tty_putstr(window, attr, str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(str == (const char*)0 ||
|
if(str == (const char*)0 ||
|
||||||
( (cw->flags & WIN_CANCELLED) &&
|
((cw->flags & WIN_CANCELLED) && (cw->type != NHW_MESSAGE)))
|
||||||
(cw->type != NHW_MESSAGE || !iflags.prevmsg_window) ))
|
|
||||||
return;
|
return;
|
||||||
if(cw->type != NHW_MESSAGE)
|
if(cw->type != NHW_MESSAGE)
|
||||||
str = compress_str(str);
|
str = compress_str(str);
|
||||||
|
|||||||
Reference in New Issue
Block a user