diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index 2965bf3..eb853b5 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -297,11 +297,14 @@ function M:setup_modes() end if m.key_plugin and name ~= "restore" then self:on_key(m.key_plugin, function() - vim.api.nvim_feedkeys(vim.keycode(""), "n", false) + local esc = vim.api.nvim_replace_termcodes("", true, true, true) + vim.api.nvim_feedkeys(esc, "n", false) local plugins = {} if vim.api.nvim_get_mode().mode:lower() == "v" then local f, t = vim.fn.line("."), vim.fn.line("v") - if f > t then f, t = t, f end + if f > t then + f, t = t, f + end for i = f, t do plugins[#plugins + 1] = self.render:get_plugin(i) end