From e239179871c4543495eecaa4eee086d96174266a Mon Sep 17 00:00:00 2001 From: skewb1k Date: Sun, 26 Oct 2025 00:51:13 +0300 Subject: fix(lsp): ensure bufnr is passed for buffer-local requests (#36325) Problem: Some LSP method handlers were making requests without specifying a bufnr, defaulting to 0 (current). This works in most cases but fails when client attaches to background buffers, causing assertions in handlers to fail. Solution: Ensure bufnr is passed to Client.request for buffer-local methods. --- runtime/lua/vim/lsp/inline_completion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim/lsp/inline_completion.lua') diff --git a/runtime/lua/vim/lsp/inline_completion.lua b/runtime/lua/vim/lsp/inline_completion.lua index c067ca6d08..6853baf84d 100644 --- a/runtime/lua/vim/lsp/inline_completion.lua +++ b/runtime/lua/vim/lsp/inline_completion.lua @@ -284,7 +284,7 @@ function Completor:request(kind) } client:request('textDocument/inlineCompletion', params, function(...) self:handler(...) - end) + end, self.bufnr) end end -- cgit