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)
|
local cmd = string.format([[:%s ]], val.name)
|
||||||
|
|
||||||
if val.nargs == "0" then
|
if val.nargs == "0" then
|
||||||
vim.cmd(cmd)
|
local cr = vim.api.nvim_replace_termcodes("<cr>", true, false, true)
|
||||||
vim.fn.histadd("cmd", val.name)
|
cmd = cmd .. cr
|
||||||
else
|
|
||||||
vim.cmd [[stopinsert]]
|
|
||||||
vim.fn.feedkeys(cmd, "n")
|
|
||||||
end
|
end
|
||||||
|
vim.cmd [[stopinsert]]
|
||||||
|
vim.api.nvim_feedkeys(cmd, "t", false)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user