lsp: Remove vim.NIL handling from apply_text_document_edit

The rpc layer normalizes `vim.NIL` to `nil`, so the scenario tested
should never happen.
This commit is contained in:
Mathias Fussenegger
2021-04-14 21:42:03 +02:00
parent b67f689e4c
commit 046991e4d5
2 changed files with 0 additions and 14 deletions

View File

@@ -470,7 +470,6 @@ 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 ~= vim.NIL
and text_document.version > 0
and M.buf_versions[bufnr]
and M.buf_versions[bufnr] > text_document.version) then