mirror of https://github.com/folke/lazy.nvim.git
fix(keys): feedkeys should include pending keys. Fixes #71
This commit is contained in:
parent
d34a02d7b2
commit
2ab651864f
|
@ -10,7 +10,15 @@ function M:_add(keys)
|
||||||
vim.keymap.del("n", keys)
|
vim.keymap.del("n", keys)
|
||||||
Util.track({ keys = keys })
|
Util.track({ keys = keys })
|
||||||
Loader.load(self.active[keys], { keys = keys })
|
Loader.load(self.active[keys], { keys = keys })
|
||||||
local feed = vim.api.nvim_replace_termcodes(keys, true, false, true)
|
local extra = ""
|
||||||
|
while true do
|
||||||
|
local c = vim.fn.getchar(0)
|
||||||
|
if c == 0 then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
extra = extra .. vim.fn.nr2char(c)
|
||||||
|
end
|
||||||
|
local feed = vim.api.nvim_replace_termcodes(keys .. extra, true, true, true)
|
||||||
vim.api.nvim_feedkeys(feed, "m", false)
|
vim.api.nvim_feedkeys(feed, "m", false)
|
||||||
Util.track()
|
Util.track()
|
||||||
end, { silent = true })
|
end, { silent = true })
|
||||||
|
|
Loading…
Reference in New Issue