summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/macro.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r--crawl-ref/source/macro.cc21
1 files changed, 8 insertions, 13 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index 17b7fa0c49..4eac355975 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -630,25 +630,20 @@ void macro_add_query( void )
// reference to the appropriate mapping
macromap &mapref = (keymap ? Keymaps[keymc] : Macros);
- snprintf( info, INFO_SIZE, "Input %s%s trigger key: ",
- keymap?
- (keymc == KC_DEFAULT? "default " :
- keymc == KC_LEVELMAP? "level-map " :
- "targeting ") :
- "",
- (keymap ? "keymap" : "macro") );
-
- mpr( info, MSGCH_PROMPT );
+ mprf(MSGCH_PROMPT, "Input %s%s trigger key: ",
+ keymap ? (keymc == KC_DEFAULT ? "default " :
+ keymc == KC_LEVELMAP ? "level-map "
+ : "targeting ")
+ : "",
+ (keymap ? "keymap" : "macro") );
+
keyseq key = getch_mul();
cprintf( "%s" EOL, (vtostr( key )).c_str() ); // echo key to screen
if (mapref[key].size() > 0)
{
- snprintf( info, INFO_SIZE, "Current Action: %s",
- (vtostr( mapref[key] )).c_str() );
-
- mpr( info, MSGCH_WARN );
+ mprf(MSGCH_WARN, "Current Action: %s", vtostr(mapref[key]).c_str());
mpr( "Do you wish to (r)edefine, (c)lear, or (a)bort?", MSGCH_PROMPT );
input = getch();