fix(builtin.commands): make 0-arg commands be repeatable by @: (#2808)
This commit is contained in:
@@ -383,12 +383,11 @@ internal.commands = function(opts)
|
||||
local cmd = string.format([[:%s ]], val.name)
|
||||
|
||||
if val.nargs == "0" then
|
||||
vim.cmd(cmd)
|
||||
vim.fn.histadd("cmd", val.name)
|
||||
else
|
||||
vim.cmd [[stopinsert]]
|
||||
vim.fn.feedkeys(cmd, "n")
|
||||
local cr = vim.api.nvim_replace_termcodes("<cr>", true, false, true)
|
||||
cmd = cmd .. cr
|
||||
end
|
||||
vim.cmd [[stopinsert]]
|
||||
vim.api.nvim_feedkeys(cmd, "t", false)
|
||||
end)
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user