Skip to content

Commit 2ab6518

Browse files
committed
fix(keys): feedkeys should include pending keys. Fixes #71
1 parent d34a02d commit 2ab6518

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lua/lazy/core/handler/keys.lua

+9-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ function M:_add(keys)
1010
vim.keymap.del("n", keys)
1111
Util.track({ keys = keys })
1212
Loader.load(self.active[keys], { keys = keys })
13-
local feed = vim.api.nvim_replace_termcodes(keys, true, false, true)
13+
local extra = ""
14+
while true do
15+
local c = vim.fn.getchar(0)
16+
if c == 0 then
17+
break
18+
end
19+
extra = extra .. vim.fn.nr2char(c)
20+
end
21+
local feed = vim.api.nvim_replace_termcodes(keys .. extra, true, true, true)
1422
vim.api.nvim_feedkeys(feed, "m", false)
1523
Util.track()
1624
end, { silent = true })

0 commit comments

Comments
 (0)