Skip to content

Commit

Permalink
fix: add v:count to ctrl+ mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
Wansmer committed Aug 16, 2024
1 parent b039275 commit 62cc28b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/langmapper/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ function M._map_translated_ctrls()
if not from:find(tr_char, 1, true) then
local term_keycodes = vim.api.nvim_replace_termcodes(keycode, true, true, true)
keymap(modes, tr_keycode, function()
vim.api.nvim_feedkeys(term_keycodes, 'm', true)
local count = vim.v.count == 0 and '' or vim.v.count
vim.api.nvim_feedkeys(count .. term_keycodes, 'm', true)
end, { desc = desc })
end
end
Expand Down

0 comments on commit 62cc28b

Please sign in to comment.