Allow range parameters on command parser (#1123)

This commit is contained in:
Jan Steinke
2021-08-19 19:11:22 +02:00
committed by GitHub
parent 161a2e9f61
commit 615efe666b
3 changed files with 8 additions and 4 deletions

View File

@@ -202,7 +202,7 @@ function command.register_keyword(keyword)
split_keywords[keyword] = true
end
function command.load_command(cmd, ...)
function command.load_command(start_line, end_line, count, cmd, ...)
local args = { ... }
if cmd == nil then
run_command { cmd = "builtin" }
@@ -211,7 +211,11 @@ function command.load_command(cmd, ...)
local user_opts = {}
user_opts["cmd"] = cmd
user_opts.opts = {}
user_opts.opts = {
start_line = start_line,
end_line = end_line,
count = count,
}
for _, arg in ipairs(args) do
if arg:find("=", 1) == nil then