Skip to content

Commit

Permalink
fix: progress use vim.lsp.get_client_by_id (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
armed authored Jun 30, 2023
1 parent 4f4a170 commit 397619d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/noice/lsp/progress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function M.progress(_, msg, info)

local message = M._progress[id]
if not message then
local client = vim.lsp.get_active_clients({ id = info.client_id })[1]
local client = vim.lsp.get_client_by_id(info.client_id)
-- should not happen, but it does for some reason
if not client then
return
Expand Down Expand Up @@ -77,7 +77,7 @@ end
function M._update()
if not vim.tbl_isempty(M._progress) then
for id, message in pairs(M._progress) do
local client = vim.lsp.get_active_clients({ id = message.opts.progress.client_id })[1]
local client = vim.lsp.get_client_by_id(message.opts.progress.client_id)
if not client then
M.close(id)
end
Expand Down

0 comments on commit 397619d

Please sign in to comment.