fix(defaults): properly pass count to quickfix commands (#30632)

This commit is contained in:
zeertzjq 2024-10-03 10:57:54 +08:00 committed by GitHub
parent 184d5e7543
commit 4075e613b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,13 +225,13 @@ do
}) })
vim.keymap.set('n', '[Q', function() vim.keymap.set('n', '[Q', function()
vim.cmd.crewind({ args = vim.v.count ~= 0 and { vim.v.count } or nil }) vim.cmd.crewind({ count = vim.v.count ~= 0 and vim.v.count or nil })
end, { end, {
desc = ':crewind', desc = ':crewind',
}) })
vim.keymap.set('n', ']Q', function() vim.keymap.set('n', ']Q', function()
vim.cmd.clast({ args = vim.v.count ~= 0 and { vim.v.count } or nil }) vim.cmd.clast({ count = vim.v.count ~= 0 and vim.v.count or nil })
end, { end, {
desc = ':clast', desc = ':clast',
}) })
@ -262,13 +262,13 @@ do
}) })
vim.keymap.set('n', '[L', function() vim.keymap.set('n', '[L', function()
vim.cmd.lrewind({ args = vim.v.count ~= 0 and { vim.v.count } or nil }) vim.cmd.lrewind({ count = vim.v.count ~= 0 and vim.v.count or nil })
end, { end, {
desc = ':lrewind', desc = ':lrewind',
}) })
vim.keymap.set('n', ']L', function() vim.keymap.set('n', ']L', function()
vim.cmd.llast({ args = vim.v.count ~= 0 and { vim.v.count } or nil }) vim.cmd.llast({ count = vim.v.count ~= 0 and vim.v.count or nil })
end, { end, {
desc = ':llast', desc = ':llast',
}) })