aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-05-04 09:53:00 +0200
committerGitHub <noreply@github.com>2020-05-04 09:53:00 +0200
commit496b668ad183411454c9e95f4618624388a939c1 (patch)
tree2bb36fec193f8c11083dcaae3e00e17b45a933fc /runtime/lua/vim/lsp/util.lua
parent501ef952983dba09b160d2e910d3842364502d7c (diff)
parent67634da71403737bd3f0c4c037b9ccf3382903ae (diff)
downloadrneovim-496b668ad183411454c9e95f4618624388a939c1.tar.gz
rneovim-496b668ad183411454c9e95f4618624388a939c1.tar.bz2
rneovim-496b668ad183411454c9e95f4618624388a939c1.zip
Merge pull request #12237 from h-michael/vim-nil
lsp: text_document.version may be vim.NIL not nil
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index e77b9f199c..6a1e799489 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -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