diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2024-05-30 10:46:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 10:46:26 +0200 |
commit | 5c33815448e11b514678f39cecc74e68131d4628 (patch) | |
tree | 98375094ca5cf9e5d035db555f08e75dd7c1d822 /runtime/lua/vim/lsp/inlay_hint.lua | |
parent | b2bad0ac91ddb9b33c3547b6fd4f7278794818d9 (diff) | |
download | rneovim-5c33815448e11b514678f39cecc74e68131d4628.tar.gz rneovim-5c33815448e11b514678f39cecc74e68131d4628.tar.bz2 rneovim-5c33815448e11b514678f39cecc74e68131d4628.zip |
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.
Diffstat (limited to 'runtime/lua/vim/lsp/inlay_hint.lua')
-rw-r--r-- | runtime/lua/vim/lsp/inlay_hint.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/inlay_hint.lua b/runtime/lua/vim/lsp/inlay_hint.lua index f98496456b..78f309abf7 100644 --- a/runtime/lua/vim/lsp/inlay_hint.lua +++ b/runtime/lua/vim/lsp/inlay_hint.lua @@ -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 |