From 2c0eba9d95a7269603a72af3fedb029c680882d5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 19 Feb 2018 21:03:29 +1100 Subject: [PATCH] user-modes: Fix incorrect use of keymap mode The keymap mode was passed to on_next_key_with_autoinfo, which means the mapping was applied directly by the InputHandler. That led to the first key being interpretted as a mapping, then all following keys being executed normally, as if typed in the parent mode of the user mapping. --- src/commands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index 51373ff6..183edcce 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -2162,7 +2162,7 @@ const CommandDesc enter_user_mode_cmd = { { KeymapManager& keymaps = get_scope(parser[0], context).keymaps(); KeymapMode mode = parse_keymap_mode(parser[1], keymaps.user_modes()); - on_next_key_with_autoinfo(context, mode, + on_next_key_with_autoinfo(context, KeymapMode::None, [mode](Key key, Context& context) mutable { if (not context.keymaps().is_mapped(key, mode)) return;