fix: move keybind command arguments to stack before executing

This avoids problems with commands that cause the current mode to be
deleted before the arguments are read such as `enter_mode`.
This commit is contained in:
CJ van den Berg 2024-11-20 19:45:00 +01:00
parent fdf0c7ada9
commit 386453ee61
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 7 additions and 5 deletions

View file

@ -8,8 +8,8 @@
["l", "move_right_vim"],
["h", "move_left"],
["<Space>", "move_right_vim"],
["i", "enter_mode", "insert"],
["v", "enter_mode", "visual"],
["i", "enter_mode", "vim/insert"],
["v", "enter_mode", "vim/visual"],
["/", "find"],
["n", "goto_next_match"],
["0", "move_begin"],
@ -32,8 +32,8 @@
"insert": {
"syntax": "vim",
"press": [
["jk", "enter_mode", "normal"],
["<Esc>", "enter_mode", "normal"]
["jk", "enter_mode", "vim/normal"],
["<Esc>", "enter_mode", "vim/normal"]
]
}
}