diff options
author | Raphael <glepnir@neovim.pro> | 2023-06-01 14:38:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 08:38:38 +0200 |
commit | be5e3611541051d9fa5b752a4fe1da6ab78b141e (patch) | |
tree | cc915d981b692cfefa64c319120df17c9e1b0307 /runtime/lua/vim/lsp.lua | |
parent | 68e2d722959dadc596edb9320bcdede38659db07 (diff) | |
download | rneovim-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.lua | 3 |
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 |