stale prompt revisited
Further discussion in the newsgroup pointed out a case not involving <ESC> where the "In what direction?" prompt remained displayed after it was no longer applicable: throwing something where there's no monster target in the line of fire. You don't get any hit or miss message in a case like that, so the last message (the prompt) stays in view. I don't think there are any cases where getdir()'s caller deliberately wants to leave the old prompt up, so just clear it unconditionally as soon as the user answers.
This commit is contained in:
@@ -2178,6 +2178,8 @@ const char *s;
|
||||
#endif
|
||||
dirsym = yn_function((s && *s != '^') ? s : "In what direction?",
|
||||
(char *)0, '\0');
|
||||
/* remove the prompt string so caller won't have to */
|
||||
clear_nhwindow(WIN_MESSAGE);
|
||||
|
||||
if (redraw_cmd(dirsym)) { /* ^R */
|
||||
docrt(); /* redraw */
|
||||
@@ -2192,10 +2194,7 @@ const char *s;
|
||||
} else if (!movecmd(dirsym) && !u.dz) {
|
||||
boolean did_help = FALSE, help_requested;
|
||||
|
||||
if (index(quitchars, dirsym)) {
|
||||
/* remove the prompt string */
|
||||
clear_nhwindow(WIN_MESSAGE);
|
||||
} else {
|
||||
if (!index(quitchars, dirsym)) {
|
||||
help_requested = (dirsym == '?');
|
||||
if (help_requested || iflags.cmdassist) {
|
||||
did_help = help_dir((s && *s == '^') ? dirsym : 0,
|
||||
|
||||
Reference in New Issue
Block a user