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.
This commit is contained in:
parent
76f5fb937c
commit
2c0eba9d95
|
@ -2162,7 +2162,7 @@ const CommandDesc enter_user_mode_cmd = {
|
||||||
{
|
{
|
||||||
KeymapManager& keymaps = get_scope(parser[0], context).keymaps();
|
KeymapManager& keymaps = get_scope(parser[0], context).keymaps();
|
||||||
KeymapMode mode = parse_keymap_mode(parser[1], keymaps.user_modes());
|
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 {
|
[mode](Key key, Context& context) mutable {
|
||||||
if (not context.keymaps().is_mapped(key, mode))
|
if (not context.keymaps().is_mapped(key, mode))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user