aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
authorRaphael <glepnir@neovim.pro>2023-06-01 14:38:38 +0800
committerGitHub <noreply@github.com>2023-06-01 08:38:38 +0200
commitbe5e3611541051d9fa5b752a4fe1da6ab78b141e (patch)
treecc915d981b692cfefa64c319120df17c9e1b0307 /runtime/lua/vim/lsp.lua
parent68e2d722959dadc596edb9320bcdede38659db07 (diff)
downloadrneovim-be5e3611541051d9fa5b752a4fe1da6ab78b141e.tar.gz
rneovim-be5e3611541051d9fa5b752a4fe1da6ab78b141e.tar.bz2
rneovim-be5e3611541051d9fa5b752a4fe1da6ab78b141e.zip
fix(lsp): add param assert in client_is_stopped (#23857)
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua3
1 files changed, 2 insertions, 1 deletions
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