mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 15:14:04 +00:00
fix(lsp): always return boolean in lsp.buf_client_attach (#24077)
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
This commit is contained in:
committed by
GitHub
parent
1f0b2dc6cd
commit
3bf887f6e0
@@ -1799,6 +1799,7 @@ end
|
||||
---
|
||||
---@param bufnr (integer) Buffer handle, or 0 for current
|
||||
---@param client_id (integer) Client id
|
||||
---@return boolean success `true` if client was attached successfully; `false` otherwise
|
||||
function lsp.buf_attach_client(bufnr, client_id)
|
||||
validate({
|
||||
bufnr = { bufnr, 'n', true },
|
||||
@@ -1887,7 +1888,7 @@ function lsp.buf_attach_client(bufnr, client_id)
|
||||
end
|
||||
|
||||
if buffer_client_ids[client_id] then
|
||||
return
|
||||
return true
|
||||
end
|
||||
-- This is our first time attaching this client to this buffer.
|
||||
buffer_client_ids[client_id] = true
|
||||
|
||||
Reference in New Issue
Block a user