Skip to content

Commit d409975

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 466de02 commit d409975

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/markmap/utils.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ local is_windows = uv.os_uname().sysname == "Windows_NT"
1717
---@return number job pid of the job, so we can stop it later.
1818
M.jobstart = function(cmd, arguments, opts)
1919
if is_windows then
20-
return vim.fn.jobstart({ cmd, unpack(arguments) }, opts)
20+
return opts and vim.fn.jobstart({ cmd, unpack(arguments) }, opts) or vim.fn.jobstart({ cmd, unpack(arguments) })
2121
else
22-
return vim.fn.jobstart(cmd .. " " .. table.concat(arguments, " "), opts)
22+
return opts and vim.fn.jobstart(cmd .. " " .. table.concat(arguments, " "), opts) or vim.fn.jobstart(cmd .. " " .. table.concat(arguments, " "))
2323
end
2424
end
2525

0 commit comments

Comments
 (0)