take two: tty bug with long 'autodescribe' text
Messages on tty which bypass message history weren't handling long lines properly. If the text wrapped to line 2, that continuation portion was left on the screen after whatever operation that put it here was finished. (To reproduce: assign a long name to a monster with a long type name so that the combined length exceeds the display width, then move the cursor over it with ';' or '/' while autodescribe is On.) This time prompting isn't adversely affected.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 topl.c $NHDT-Date: 1560600658 2019/06/15 12:10:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.46 $ */
|
||||
/* NetHack 3.6 topl.c $NHDT-Date: 1560608320 2019/06/15 14:18:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.47 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2009. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -151,15 +151,16 @@ const char *str;
|
||||
struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||
|
||||
if (!(cw->flags & WIN_STOP)) {
|
||||
if (ttyDisplay->cury && ttyDisplay->toplin == 2)
|
||||
tty_clear_nhwindow(WIN_MESSAGE);
|
||||
|
||||
cw->curx = cw->cury = 0;
|
||||
home();
|
||||
cl_end();
|
||||
addtopl(str);
|
||||
|
||||
#if 0 /* this doesn't work as intended; it disrupts multi-line prompts */
|
||||
if (ttyDisplay->cury && ttyDisplay->toplin != 3)
|
||||
more();
|
||||
#endif
|
||||
ttyDisplay->toplin = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user