aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-04-14 13:01:08 -0700
committerGitHub <noreply@github.com>2021-04-14 13:01:08 -0700
commit9471b159362aabd35ef044a95e46520e8c110a57 (patch)
tree4be3e72e7c455aeb94ec0eaa0f663d14387f2a6d /runtime/lua
parentd9c7adc64c291f1a368c1417354332f72bdb66d6 (diff)
parent046991e4d5c6bc25ee11bbe28f0b685f00cf1d3d (diff)
downloadrneovim-9471b159362aabd35ef044a95e46520e8c110a57.tar.gz
rneovim-9471b159362aabd35ef044a95e46520e8c110a57.tar.bz2
rneovim-9471b159362aabd35ef044a95e46520e8c110a57.zip
Merge pull request #14366 from mfussenegger/text-document-version-zero
lsp: Accept text document edits with version zero
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 28a669778a..71ec85381b 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -470,6 +470,7 @@ function M.apply_text_document_edit(text_document_edit, index)
-- `VersionedTextDocumentIdentifier`s version may be null
-- https://microsoft.github.io/language-server-protocol/specification#versionedTextDocumentIdentifier
if should_check_version and (text_document.version
+ and text_document.version > 0
and M.buf_versions[bufnr]
and M.buf_versions[bufnr] > text_document.version) then
print("Buffer ", text_document.uri, " newer than edits.")