backport: 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 Sean Dewar
parent 51d6b26729
commit 132053c1d2
No known key found for this signature in database
GPG Key ID: 08CC2C83AD41B581

View File

@ -1150,7 +1150,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.