> clear stale prompt
[...]
> Can someone who understands the relevant windowing code fix ^R in getpos()?

     I still don't understand why it wasn't working as expected, but moving
the existing cursor positioning after flush_screen() instead of before now
makes ^R work ok during getpos().  It doesn't restore the top line text so
isn't a transparent redraw but it now displays a prompt string there instead.
Likewise after typing '?' for help so that it should be move evident that
nethack is still waiting for you to move the cursor somewhere.

     Also add support for ^L in numpad mode.  I almost never use that and
didn't think of it the first time around.
This commit is contained in:
nethack.rankin
2005-05-08 04:22:53 +00:00
parent bb19016785
commit 06bb86e63b
4 changed files with 24 additions and 13 deletions

View File

@@ -1301,6 +1301,7 @@ minimal_enlightenment()
return (n != -1);
}
/* ^X command */
STATIC_PTR int
doattributes()
{
@@ -1654,6 +1655,13 @@ add_debug_extended_commands()
}
}
/* decide whether a character (user input keystroke) requests screen repaint */
boolean
redraw_cmd(c)
char c;
{
return (c == C('r') || (iflags.num_pad && c == C('l')));
}
static const char template[] = "%-18s %4ld %6ld";
static const char count_str[] = " count bytes";
@@ -2171,7 +2179,7 @@ const char *s;
dirsym = yn_function((s && *s != '^') ? s : "In what direction?",
(char *)0, '\0');
if (dirsym == C('r')) { /* ^R */
if (redraw_cmd(dirsym)) { /* ^R */
docrt(); /* redraw */
goto retry;
}