From: Bart House Date: Mon, 15 Jul 2019 04:17:19 +0000 (-0700) Subject: Revert "Fixed bug with inmore and toplin state management." X-Git-Tag: v3.6.3.757eca7~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a598428fc9bdabf33d482855f8b5db4c78896a10;p=nethack Revert "Fixed bug with inmore and toplin state management." This reverts commit 0f57f0e48ca6e6823fb238566d5faddd3cf0726b. --- diff --git a/win/tty/topl.c b/win/tty/topl.c index bb79be26c..d2a889cc9 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -139,7 +139,7 @@ const char *str; putsyms(str); cl_end(); ttyDisplay->toplin = TOPLINE_NEED_MORE; - if (ttyDisplay->cury && otoplin != TOPLINE_SPECIAL_PROMPT) + if (ttyDisplay->cury && otoplin != 3) more(); } @@ -204,14 +204,11 @@ more() { struct WinDesc *cw = wins[WIN_MESSAGE]; - if (iflags.debug_fuzzer) - return; - /* avoid recursion -- only happens from interrupts */ - if (ttyDisplay->inmore) + if (ttyDisplay->inmore++) + return; + if (iflags.debug_fuzzer) return; - - ttyDisplay->inmore++; if (ttyDisplay->toplin) { tty_curs(BASE_WINDOW, cw->curx + 1, cw->cury); @@ -259,7 +256,6 @@ register const char *bp; && cw->cury == 0 && n0 + (int) strlen(toplines) + 3 < CO - 8 /* room for --More-- */ && (notdied = strncmp(bp, "You die", 7)) != 0) { - nhassert(strlen(toplines) == cw->curx); Strcat(toplines, " "); Strcat(toplines, bp); cw->curx += 2; @@ -313,7 +309,6 @@ char c; if (ttyDisplay->curx == 0 && ttyDisplay->cury > 0) tty_curs(BASE_WINDOW, CO, (int) ttyDisplay->cury - 1); backsp(); - nhassert(ttyDisplay->curx > 0); ttyDisplay->curx--; cw->curx = ttyDisplay->curx; return; @@ -694,13 +689,6 @@ boolean restoring_msghist; } if (msg) { - /* Caller is asking us to remember a top line that needed more. - Should we call more? This can happen when the player has set - iflags.force_invmenu and they attempt to shoot with nothing in - the quiver. */ - if (ttyDisplay && ttyDisplay->toplin == TOPLINE_NEED_MORE) - ttyDisplay->toplin = TOPLINE_NON_EMPTY; - /* move most recent message to history, make this become most recent */ remember_topl(); Strcpy(toplines, msg); @@ -708,9 +696,6 @@ boolean restoring_msghist; dumplogmsg(toplines); #endif } else if (snapshot_mesgs) { - nhassert(ttyDisplay == NULL || - ttyDisplay->toplin != TOPLINE_NEED_MORE); - /* done putting arbitrary messages in; put the snapshot ones back */ for (idx = 0; snapshot_mesgs[idx]; ++idx) { remember_topl();