]> granicus.if.org Git - nethack/commitdiff
more getpos() reversal (trunk only)
authornethack.rankin <nethack.rankin>
Mon, 12 Dec 2011 22:50:21 +0000 (22:50 +0000)
committernethack.rankin <nethack.rankin>
Mon, 12 Dec 2011 22:50:21 +0000 (22:50 +0000)
     There was a second instance of curs()+flush_screen() that had the
calls swapped 5.5 years ago and is being restored to 3.4.3 state here.

     It turns out that swapping the other instance of those two calls
didn't help with the original problem (^R during getpos() redrew the
screen but left the cursor at the end of the 2nd status line) at all.
Only adding the pline() call after docrt() fixed it.  pline() calls
flush_screen(1) which ultimately puts the cursor back on the hero.  I
still don't understand why curs(WIN_MAP,x,y)+flush_screen(0) leaves it
on the status line instead of at the specified map coordinates.  That
must be a bug in the tty code somewhere.

src/do_name.c

index 4b0cd5f4fc6157bed143804fcb5ffc142b01342e..eb234ce948c209dcc10defdfafa5431e2a5954d0 100644 (file)
@@ -75,8 +75,8 @@ const char *goal;
 #ifdef CLIPPING
     cliparound(cx, cy);
 #endif
-    flush_screen(0);
     curs(WIN_MAP, cx, cy);
+    flush_screen(0);
 #ifdef MAC
     lock_mouse_cursor(TRUE);
 #endif