fix(lsp): resolve bufnr in buf_is_attached (#15523)

This commit is contained in:
Jose Alvarez 2021-08-30 20:46:00 +09:00 committed by GitHub
parent 3ab73ff81f
commit 325fad8983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.