summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/macro.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-05-23 15:38:00 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-05-23 15:38:00 +0200
commit5ef9f7d49fb8efad335bdbefeb25645e32a8e19d (patch)
tree18ed51b98d3383bab3fb2e67c1974d447bbbac8f /crawl-ref/source/macro.cc
parentb42f917ad96d847b14d8aa38c9fe95bb8fcf6c95 (diff)
downloadcrawl-ref-5ef9f7d49fb8efad335bdbefeb25645e32a8e19d.tar.gz
crawl-ref-5ef9f7d49fb8efad335bdbefeb25645e32a8e19d.zip
Let sendkeys() input not yet injected into the macro buffer inhibit ready().
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r--crawl-ref/source/macro.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index ab5a4fe1d1..3967cf3291 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -575,6 +575,11 @@ bool is_processing_macro()
return (macro_keys_left >= 0);
}
+bool has_pending_input()
+{
+ return !Buffer.empty() && !SendKeysBuffer.empty();
+}
+
/*
* Command macros are only applied from the immediate front of the
* buffer, and only when the game is expecting a command.