diff --git a/doc/fixes34.4 b/doc/fixes34.4 index c8da32f45..0e135111c 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -120,6 +120,7 @@ probing the resulting double-gold monster caused "static object freed" panic cursed wand might explode if used to engrave fatal wish from magic lamp left functional magic lamp in bones data fatal wish granted by monster left that monster in bones data +clear prompt from screen after ESC is used to abort "In what direction?" Platform- and/or Interface-Specific Fixes diff --git a/src/cmd.c b/src/cmd.c index 35629ffe8..7282edad5 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)cmd.c 3.5 2004/10/27 */ +/* SCCS Id: @(#)cmd.c 3.5 2005/05/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2170,15 +2170,24 @@ const char *s; #endif dirsym = yn_function((s && *s != '^') ? s : "In what direction?", (char *)0, '\0'); + + if (dirsym == C('r')) { /* ^R */ + docrt(); /* redraw */ + goto retry; + } #ifdef REDO savech(dirsym); #endif + if (dirsym == '.' || dirsym == 's') { u.dx = u.dy = u.dz = 0; } else if (!movecmd(dirsym) && !u.dz) { boolean did_help = FALSE, help_requested; - if (!index(quitchars, dirsym)) { + if (index(quitchars, dirsym)) { + /* remove the prompt string */ + clear_nhwindow(WIN_MESSAGE); + } else { help_requested = (dirsym == '?'); if (help_requested || iflags.cmdassist) { did_help = help_dir((s && *s == '^') ? dirsym : 0, diff --git a/src/do_name.c b/src/do_name.c index 611d385bc..0f6e7a1a7 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)do_name.c 3.5 2003/01/14 */ +/* SCCS Id: @(#)do_name.c 3.5 2005/05/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -23,6 +23,11 @@ nextmbuf() return bufs[bufidx]; } +/* same definition as in cmd.c */ +#ifndef C +#define C(a) ((a) & 0x1f) /* ^a */ +#endif + /* the response for '?' help request in getpos() */ STATIC_OVL void getpos_help(force, goal) @@ -97,7 +102,7 @@ const char *goal; } if ((cp = index(pick_chars, c)) != 0) { /* '.' => 0, ',' => 1, ';' => 2, ':' => 3 */ - result = cp - pick_chars; + result = (int)(cp - pick_chars); break; } for (i = 0; i < 8; i++) { @@ -136,6 +141,8 @@ const char *goal; if(c == '?'){ getpos_help(force, goal); + } else if (c == C('r')) { /* ^R */ + docrt(); /* redraw */ } else { if (!index(quitchars, c)) { char matching[MAXPCHARS];