diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-02 17:23:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 17:23:45 +0800 |
commit | 843c1bed95d35f7c6081857fc8ce237f3823d6a1 (patch) | |
tree | 7cb710f9d26df8bab549469bd76a1fd1e0d09ae3 | |
parent | 9f3c4c152664b21593636a59ce21e74ab7000b20 (diff) | |
download | rneovim-843c1bed95d35f7c6081857fc8ce237f3823d6a1.tar.gz rneovim-843c1bed95d35f7c6081857fc8ce237f3823d6a1.tar.bz2 rneovim-843c1bed95d35f7c6081857fc8ce237f3823d6a1.zip |
fix(health): stop job properly on timeout (#23877)
-rw-r--r-- | runtime/lua/provider/health.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/provider/health.lua b/runtime/lua/provider/health.lua index 3a60e38fe5..e0bfe57cb6 100644 --- a/runtime/lua/provider/health.lua +++ b/runtime/lua/provider/health.lua @@ -109,13 +109,13 @@ local function system(cmd, ...) end if not is_blank(stdin) then - vim.cmd([[call jobsend(jobid, stdin)]]) + vim.api.nvim_chan_send(jobid, stdin) end local res = vim.fn.jobwait({ jobid }, 30000) if res[1] == -1 then error('Command timed out: ' .. shellify(cmd)) - vim.cmd([[call jobstop(jobid)]]) + vim.fn.jobstop(jobid) elseif shell_error() and not ignore_error then local emsg = 'Command error (job=' .. jobid |