Skip to content

Commit 46280a1

Browse files
committed
fix(keys): don't escape pendig keys twice and only convert when number
1 parent 9a2ecc8 commit 46280a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/lazy/core/handler/keys.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ local M = {}
1616
function M.retrigger(keys)
1717
local pending = ""
1818
while true do
19+
---@type number|string
1920
local c = vim.fn.getchar(0)
2021
if c == 0 then
2122
break
2223
end
23-
pending = pending .. vim.fn.nr2char(c)
24+
c = type(c) == "number" and vim.fn.nr2char(c) or c
25+
pending = pending .. c
2426
end
25-
local feed = vim.api.nvim_replace_termcodes(keys .. pending, true, true, true)
27+
local feed = vim.api.nvim_replace_termcodes(keys, true, false, true) .. pending
2628
vim.api.nvim_feedkeys(feed, "m", false)
2729
end
2830

0 commit comments

Comments
 (0)