From: Michael Meyer Date: Tue, 8 Feb 2022 22:45:12 +0000 (-0500) Subject: Fix: tty map weirdness after 'full-screen' menu X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89bbe7701084c30ca1235f02aecc5e90f23a4f9f;p=nethack Fix: tty map weirdness after 'full-screen' menu When a 'full-screen' (cw->offx and cw->offy both 0) menu was immediately followed by an offset menu -- as in the case of selecting certain options from the options menu, or using loot to take out/put in items after using ':' to describe the contents of a very full container -- there were some odd interactions with the map. Only certain parts of the map near/under the menu window would be redrawn if the first offset menu was followed by another one, while a getlin prompt would cause the entire map to be redrawn, with parts intersecting the window being drawn on top of it and obscuring it. Flushing the display immediately after the docrt call when closing a full-screen menu seems to fix both these issues. --- diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 4f9b48452..dc8c18707 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1573,6 +1573,7 @@ erase_menu_or_text(winid window, struct WinDesc *cw, boolean clear) clear_screen(); } else { docrt(); + flush_screen(1); } } else { docorner((int) cw->offx, cw->maxrow + 1);