]> granicus.if.org Git - nethack/commitdiff
Fix: tty map weirdness after 'full-screen' menu
authorMichael Meyer <me@entrez.cc>
Tue, 8 Feb 2022 22:45:12 +0000 (17:45 -0500)
committerPatR <rankin@nethack.org>
Sat, 12 Feb 2022 14:13:50 +0000 (06:13 -0800)
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.

win/tty/wintty.c

index 4f9b484524deea6e666e37287a736e5ffa4fa977..dc8c1870773c4b2233d2ec575db586ef2e84e942 100644 (file)
@@ -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);