irongit

A Neovim plugin enabling you to solve LeetCode problems.

fix: detach open command execution (#80)

This commit simply switches `os.execute` with `vim.fn.jobstart` with
`detach` set to `true`, making the editor available after opening the
problems' url allowing you to edit, while the browser is running.

The `detach` option keeps the browser open after the editor shuts down.
It is not the default behavior (which would make the browser shut down
with the editor, I find the introduced behavior to be more appropriate).

NOTE: This commit has been tested only on Linux; but I don't suppose
there would be any meaningful difference.
AlOwainauthored committed by GitHub
parent 765cc76commit a92e764cda74331789210c6ff6587bf269e0ffafBrowse files

1 file changed, +1 -1

+1-1lua/leetcode/command/init.lua
@@ -313,7 +313,7 @@ function cmd.open()
313313 command = string.format("start \"\" \"%s\"", q.cache.link)
314314 end
315315
316- os.execute(command)
316+ vim.fn.jobstart(command, { detach = true })
317317 end
318318 end
319319