I use <C-c> to go back to normal mode instead of Escape however the very first time I get this error:
Error executing vim.on_key Lua callback: vim.lua:498: Error executing 'on_key' with ns_ids '5'
Messages: Keyboard interrupt
stack traceback:
[C]: in function 'error'
vim.lua:498: in function <vim.lua:485>
The following patch fixes it however it breaks getting out of visual mode:
local on_key = vim.on_key or vim.register_keystroke_callback
on_key(function(key)
+ if key == util.get_termcode('<C-c>') then
+ return
+ end
+
local current_mode = vim.fn.mode()
I think this is fixed in #15, if you or anyone else could use the graceful-error branch and let me know if everything works as expected that'd be much appreciated 😌
I use
<C-c>
to go back to normal mode instead of Escape however the very first time I get this error:The following patch fixes it however it breaks getting out of visual mode: