From 52984419ffa051d66bccec9f93e7cbb4fdd94976 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 20 Dec 2022 18:24:40 +0100 Subject: [PATCH] fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28 --- lua/lazy/core/handler/keys.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/handler/keys.lua b/lua/lazy/core/handler/keys.lua index 301b408..34f8ea9 100644 --- a/lua/lazy/core/handler/keys.lua +++ b/lua/lazy/core/handler/keys.lua @@ -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