mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
fix(lsp): require bufnr for apply_text_edits (#16444)
This commit is contained in:

committed by
GitHub

parent
72d62aa6aa
commit
102e7e7929
@@ -325,6 +325,10 @@ end
|
||||
---@param bufnr number Buffer id
|
||||
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textEdit
|
||||
function M.apply_text_edits(text_edits, bufnr)
|
||||
validate {
|
||||
text_edits = { text_edits, 't', false };
|
||||
bufnr = { bufnr, 'number', false };
|
||||
}
|
||||
if not next(text_edits) then return end
|
||||
if not api.nvim_buf_is_loaded(bufnr) then
|
||||
vim.fn.bufload(bufnr)
|
||||
|
Reference in New Issue
Block a user