mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix(lsp): cancel watchers when closing a client
This commit is contained in:
@@ -167,5 +167,14 @@ function M.unregister(unreg, ctx)
|
||||
end
|
||||
end
|
||||
|
||||
--- @param client_id integer
|
||||
function M.cancel(client_id)
|
||||
for _, reg_cancels in pairs(cancels[client_id]) do
|
||||
for _, cancel in pairs(reg_cancels) do
|
||||
cancel()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
Reference in New Issue
Block a user