diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 00:42:21 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-12 00:42:21 +0000 |
commit | 5ae26dde5e4e334ae902e23eb6791a9ef537f11e (patch) | |
tree | fd346d8ca24645095303422da9921643132ce91b /crawl-ref/source/macro.cc | |
parent | 510a5b2129d86a9c6591e701725379f6f1a6a67f (diff) | |
download | crawl-ref-5ae26dde5e4e334ae902e23eb6791a9ef537f11e.tar.gz crawl-ref-5ae26dde5e4e334ae902e23eb6791a9ef537f11e.zip |
[1909218] Fixing issue where keymaps were affecting menu choices done by keyboard or through the tiles mouse interface.
I couldn't think of any reason why keymaps should ever apply to menu selections (and certainly not the KC_DEFAULT map), so I added a new special keymap context called KC_NONE which doesn't apply keymaps to new input. This is used for all menus.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5739 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r-- | crawl-ref/source/macro.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc index 74e294c4d7..2f2ad22ff3 100644 --- a/crawl-ref/source/macro.cc +++ b/crawl-ref/source/macro.cc @@ -641,8 +641,10 @@ int getchm(KeymapContext mc, int (*rgetch)()) // Read some keys... keyseq keys = getch_mul(rgetch); - // ... and add them into the buffer - macro_buf_add_long( keys, Keymaps[mc] ); + if (mc == KC_NONE) + macro_buf_add(keys); + else + macro_buf_add_long(keys, Keymaps[mc]); return (macro_buf_get()); } |