summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-07-27 20:18:09 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-07-27 20:18:09 +0100
commit8ed16bb2e9f29a7f31f38365b87e5a9ee72fb921 (patch)
tree18dadcc3871a1c9b6be003b65d66809c4a0ae03f /src/input_handler.cc
parent7c10660f9a03f7b8a909f06a8880c8a308b09c82 (diff)
In non interactive interactive mode, disable user key mappings
exec and eval now accepts a -with-maps to use them. But by default they are disabled, so that all the indent scripts work even if you remap basic keys. Fixes #217
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 90e455a4..9459dd74 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -991,7 +991,8 @@ void InputHandler::handle_key(Key key)
auto keymap_mode = m_mode->keymap_mode();
KeymapManager& keymaps = m_context.keymaps();
- if (keymaps.is_mapped(key, keymap_mode))
+ if (keymaps.is_mapped(key, keymap_mode) and
+ not m_context.are_keymaps_disabled())
{
for (auto& k : keymaps.get_mapping(key, keymap_mode))
m_mode->on_key(k);