summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2023-05-29 20:08:02 +1000
committerMaxime Coste <mawww@kakoune.org>2023-05-29 20:11:06 +1000
commitcf7c6380254c7c2733952d2899761a2afc881b44 (patch)
tree7e1dd924a2c37fb34063ae7d3e9e2668f036ec2a /src/input_handler.cc
parent3069b68245a0bd5451fac33a56097eb7c9351975 (diff)
Refactor KeymapManager to enfore setting is_executing on key iteration
Add an iterator based remove to HashMap as that was missing. Make KeymapManager responsible for throwing on unmap an executing mapping.
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index fb1d9ff6..a36d13f1 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -1774,9 +1774,7 @@ void InputHandler::handle_key(Key key)
{
ScopedSetBool disable_history{context().history_disabled()};
- auto& mapping = keymaps.get_mapping(key, keymap_mode);
- ScopedSetBool executing_mapping{mapping.is_executing};
- for (auto& k : mapping.keys)
+ for (auto& k : keymaps.get_mapping_keys(key, keymap_mode))
process_key(k);
}
else