mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
refactor(lsp): replace util.buf_versions with changedtick (#28943)
`lsp.util.buf_versions` was already derived from changedtick (`on_lines` from `buf_attach` synced the version) As far as I can tell there is no need to keep track of the state in a separate table.
This commit is contained in:

committed by
GitHub

parent
b2bad0ac91
commit
5c33815448
@@ -43,7 +43,7 @@ function M.on_inlayhint(err, result, ctx, _)
|
||||
return
|
||||
end
|
||||
local bufnr = assert(ctx.bufnr)
|
||||
if util.buf_versions[bufnr] ~= ctx.version then
|
||||
if vim.b[bufnr].changedtick ~= ctx.version then
|
||||
return
|
||||
end
|
||||
local client_id = ctx.client_id
|
||||
@@ -324,7 +324,7 @@ api.nvim_set_decoration_provider(namespace, {
|
||||
return
|
||||
end
|
||||
|
||||
if bufstate.version ~= util.buf_versions[bufnr] then
|
||||
if bufstate.version ~= vim.b[bufnr].changedtick then
|
||||
return
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user