From 8ed16bb2e9f29a7f31f38365b87e5a9ee72fb921 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 27 Jul 2014 20:18:09 +0100 Subject: 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 --- src/input_handler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/input_handler.cc') 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); -- cgit v1.2.3