mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 03:58:32 +00:00
fix(lsp): include cancellable in progress message table (#18809)
Currently the `title`, `message` and `percentage` is stored for a progress, but there is also an optional `cancellable` that comes in with both the `WorkDoneProgressBegin` and also `WorkDoneProgressReport`. This change also stores that value so that a plugin can access it when they do a lookup in `client.messages`.
This commit is contained in:
@@ -40,10 +40,12 @@ local function progress_handler(_, result, ctx, _)
|
||||
if val.kind == 'begin' then
|
||||
client.messages.progress[token] = {
|
||||
title = val.title,
|
||||
cancellable = val.cancellable,
|
||||
message = val.message,
|
||||
percentage = val.percentage,
|
||||
}
|
||||
elseif val.kind == 'report' then
|
||||
client.messages.progress[token].cancellable = val.cancellable
|
||||
client.messages.progress[token].message = val.message
|
||||
client.messages.progress[token].percentage = val.percentage
|
||||
elseif val.kind == 'end' then
|
||||
|
Reference in New Issue
Block a user