mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
Merge pull request #12237 from h-michael/vim-nil
lsp: text_document.version may be vim.NIL not nil
This commit is contained in:
@@ -160,7 +160,7 @@ function M.apply_text_document_edit(text_document_edit)
|
||||
local text_document = text_document_edit.textDocument
|
||||
local bufnr = vim.uri_to_bufnr(text_document.uri)
|
||||
-- `VersionedTextDocumentIdentifier`s version may be nil https://microsoft.github.io/language-server-protocol/specification#versionedTextDocumentIdentifier
|
||||
if text_document.version ~= nil and M.buf_versions[bufnr] > text_document.version then
|
||||
if text_document.version ~= vim.NIL and M.buf_versions[bufnr] > text_document.version then
|
||||
print("Buffer ", text_document.uri, " newer than edits.")
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user