From be5e3611541051d9fa5b752a4fe1da6ab78b141e Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 1 Jun 2023 14:38:38 +0800 Subject: fix(lsp): add param assert in client_is_stopped (#23857) --- runtime/lua/vim/lsp.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index c9ca8cd224..d64ed0b5a3 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -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 -- cgit