From: nethack.rankin Date: Mon, 12 Dec 2011 02:19:19 +0000 (+0000) Subject: getpos fix (trunk only) X-Git-Tag: MOVE2GIT~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e5f74a0748523a6fb261ad998d07bca0133bd2c;p=nethack getpos fix (trunk only) This ought to fix the problem excountered by Ken, where the cursor wasn't at the spot '/y' was reporting on. This reverses part of a change from May, 2005. I still don't understand the original behavior, which was that docrt() for ^R followed by positioning the cursor at a specific map coordinate and calling flush_screen() was leaving the cursor at the end of the second status line. Reversing flush_screen and curs(WIN_MAP) made it work for tty but screwed up X11. It turns out that including pline("Move cursor to %s:") *also* makes things work as intended, so that the flush/position hack wasn't necessary once that other change went in (same 2005 patch, but the cursor hack was implemented first at that time; once this reversal is in place, commenting out the pline() does bring the odd behavior for tty back). --- diff --git a/src/do_name.c b/src/do_name.c index fe8bd6abe..4b0cd5f4f 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -201,8 +201,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(FALSE);