aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
authorJose Alvarez <j.alvarez11@icloud.com>2021-08-30 20:46:00 +0900
committerGitHub <noreply@github.com>2021-08-30 07:46:00 -0400
commit325fad89830a9e1049c210fcc6e65ca7901ad9f2 (patch)
tree6c73e5ff33f0c01469d18b2ca250773a9d0cfe65 /runtime/lua/vim/lsp.lua
parent3ab73ff81f4a487e97a057c06bd6c07df9cef9e3 (diff)
downloadrneovim-325fad89830a9e1049c210fcc6e65ca7901ad9f2.tar.gz
rneovim-325fad89830a9e1049c210fcc6e65ca7901ad9f2.tar.bz2
rneovim-325fad89830a9e1049c210fcc6e65ca7901ad9f2.zip
fix(lsp): resolve bufnr in buf_is_attached (#15523)
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 05926f489f..5790b53e0d 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -1152,7 +1152,7 @@ end
---@param bufnr (number) Buffer handle, or 0 for current
---@param client_id (number) the client id
function lsp.buf_is_attached(bufnr, client_id)
- return (all_buffer_active_clients[bufnr] or {})[client_id] == true
+ return (all_buffer_active_clients[resolve_bufnr(bufnr)] or {})[client_id] == true
end
--- Gets a client by id, or nil if the id is invalid.