Skip to content

Commit 1ca57ed

Browse files
committed
fix(utils): Vim:E475 after adding opts to jobstart wrapper
Looks like I've broken open and save after adding opts. This should adress this. For some reason vim.fn.jobstart() can't handle an empty table as opts. Maybe someone has a better solution that this, but this works for now.
1 parent d7af548 commit 1ca57ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/markmap/utils.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ local is_windows = vim.uv.os_uname().sysname == "Windows_NT"
1616
---@return number job pid of the job, so we can stop it later.
1717
M.jobstart = function(cmd, arguments, opts)
1818
if is_windows then
19-
return vim.fn.jobstart({ cmd, unpack(arguments) }, opts)
19+
return opts and vim.fn.jobstart({ cmd, unpack(arguments) }, opts) or vim.fn.jobstart({ cmd, unpack(arguments) })
2020
else
21-
return vim.fn.jobstart(cmd .. " " .. table.concat(arguments, " "), opts)
21+
return opts and vim.fn.jobstart(cmd .. " " .. table.concat(arguments, " "), opts) or vim.fn.jobstart(cmd .. " " .. table.concat(arguments, " "))
2222
end
2323
end
2424

0 commit comments

Comments
 (0)