mirror of
https://github.com/neovim/neovim.git
synced 2026-04-14 03:26:10 +00:00
fix(lsp): do not respond to codelens refresh if a request is already scheduled (#38801)
(cherry picked from commit 909fc0b992)
This commit is contained in:
committed by
github-actions[bot]
parent
6cb439ac9e
commit
c692e848e9
@@ -484,10 +484,13 @@ function M.on_refresh(err, _, ctx)
|
||||
for bufnr, provider in pairs(Provider.active) do
|
||||
for client_id in pairs(provider.client_state) do
|
||||
if client_id == ctx.client_id then
|
||||
provider:request(client_id, function()
|
||||
provider.row_version = {}
|
||||
vim.api.nvim__redraw({ buf = bufnr, valid = true, flush = false })
|
||||
end)
|
||||
-- Do nothing if a request is already scheduled.
|
||||
if not provider.timer then
|
||||
provider:request(client_id, function()
|
||||
provider.row_version = {}
|
||||
vim.api.nvim__redraw({ buf = bufnr, valid = true, flush = false })
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user