fix(lsp): add param assert in client_is_stopped (#23857)

This commit is contained in:
Raphael 2023-06-01 14:38:38 +08:00 committed by GitHub
parent 68e2d72295
commit be5e361154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2275,7 +2275,8 @@ end
---@param client_id (integer)
---@return boolean stopped true if client is stopped, false otherwise.
function lsp.client_is_stopped(client_id)
return active_clients[client_id] == nil
assert(client_id, 'missing client_id param')
return active_clients[client_id] == nil and not uninitialized_clients[client_id]
end
--- Gets a map of client_id:client pairs for the given buffer, where each value