fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28

This commit is contained in:
Folke Lemaitre 2022-12-20 18:24:40 +01:00
parent 2927b0597e
commit 52984419ff
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 2 deletions

View File

@ -10,9 +10,10 @@ function M:_add(keys)
vim.keymap.del("n", keys)
Util.track({ keys = keys })
Loader.load(self.active[keys], { keys = keys })
vim.api.nvim_input(keys)
local feed = vim.api.nvim_replace_termcodes(keys, true, false, true)
vim.api.nvim_feedkeys(feed, "m", false)
Util.track()
end)
end, { silent = true })
end
---@param keys string