mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
lsp: remove buffer version on buffer_detach (#12029)
When we save the buffer, the buffer is detached and attached again. So the client also needs to remove the buffer version once.
This commit is contained in:
@@ -134,8 +134,7 @@ end
|
||||
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)
|
||||
-- TODO(ashkan) check this is correct.
|
||||
if (M.buf_versions[bufnr] or 0) > text_document.version then
|
||||
if 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