Closed mrcjkb closed 1 year ago
This is low priority for me, because I was able to work around this issue by wrapping the lua function in a file:
-- ~/.config/nvim/lua/kaymap-utils.lua
local M = {}
M.test_func = function()
print('<C-c> has been remapped.')
end
and setting the keymap like this:
vim.keymap.set('n', '<C-c>', '<cmd>lua require("keymap-utils").test_func()<CR>')
A bit ugly, but it works.
Looks like this has been fixed in NeoVim 0.8.
I have
<C-c>
remapped to call a lua function usingvim.keymap.set
.It appears that the
quick_scope#Reload()
function can't handle this, and errors when attempting to restoreb:qs_prev_ctrl_c_map
.Here is a minimal neovim config to reproduce the behaviour:
/tmp/nvim-minimal
.nvim -u <path-to-minimal-config.lua>
-> This will bootstrap packer and install the quick-scope plgin to/tmp/nvim-minimal
.nvim -u <path-to-minimal-config.lua>
<C-c>
-> It will print a message.<C-c>
again.Expected behaviour:
<C-c>
prints a message after using quick-scopeActual behaviour:
<C-c>
do nothing.I guess a fix would be not to temporarily remap
<C-c>
if it cannot be interpreted by vimscript?