mirror of
https://github.com/neovim/neovim.git
synced 2025-09-25 04:28:33 +00:00
fix(lsp): check if buffer was detached in on_init callback (#28942)
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
(cherry picked from commit af200c10cf
)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
This commit is contained in:
![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
10a16c1311
commit
bdd5871dc5
@@ -70,8 +70,8 @@ before_each(function()
|
||||
inlayHintProvider = true,
|
||||
},
|
||||
handlers = {
|
||||
['textDocument/inlayHint'] = function()
|
||||
return vim.json.decode(response)
|
||||
['textDocument/inlayHint'] = function(_, _, callback)
|
||||
callback(nil, vim.json.decode(response))
|
||||
end,
|
||||
}
|
||||
})
|
||||
@@ -106,8 +106,8 @@ describe('vim.lsp.inlay_hint', function()
|
||||
inlayHintProvider = true,
|
||||
},
|
||||
handlers = {
|
||||
['textDocument/inlayHint'] = function()
|
||||
return {}
|
||||
['textDocument/inlayHint'] = function(_, _, callback)
|
||||
callback(nil, {})
|
||||
end,
|
||||
}
|
||||
})
|
||||
@@ -206,8 +206,8 @@ describe('vim.lsp.inlay_hint', function()
|
||||
inlayHintProvider = true,
|
||||
},
|
||||
handlers = {
|
||||
['textDocument/inlayHint'] = function()
|
||||
return { expected2 }
|
||||
['textDocument/inlayHint'] = function(_, _, callback)
|
||||
callback(nil, { expected2 })
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user