ci: type checking
Some checks failed
luarocks / quality (push) Has been cancelled
luarocks / publish (push) Has been cancelled

This commit is contained in:
Barrett Ruth 2026-03-01 17:28:00 -05:00
parent b905ed04ed
commit e1d7abf58e
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 16 additions and 5 deletions

View file

@ -114,14 +114,16 @@ function M.stop(bufnr)
return
end
log.dbg('stopping process for buffer %d', bufnr)
proc.obj:kill('sigterm')
---@type fun(self: table, signal: string|integer)
local kill = proc.obj.kill
kill(proc.obj, 'sigterm')
local timer = vim.uv.new_timer()
if timer then
timer:start(5000, 0, function()
timer:close()
if active[bufnr] and active[bufnr].obj == proc.obj then
proc.obj:kill('sigkill')
kill(proc.obj, 'sigkill')
active[bufnr] = nil
end
end)