Skip to content

Commit

Permalink
fix: don't forget about v:count in feedkeys()
Browse files Browse the repository at this point in the history
  • Loading branch information
Wansmer committed Aug 16, 2024
1 parent 1756989 commit 6d1b0cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/langmapper/auto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ local function automapping(scope, bufnr)
if not (is_same or has_map(lhs, mode, mappings)) then
local rhs = function()
local repl = vim.api.nvim_replace_termcodes(map.lhs, true, true, true)
vim.api.nvim_feedkeys(repl, 'm', true)
vim.api.nvim_feedkeys((vim.v.count == 0 and '' or vim.v.count) .. repl, 'm', true)
end

-- No need original opts because uses `nvim_feedkeys()`
Expand Down

0 comments on commit 6d1b0cd

Please sign in to comment.