neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 1a20aed3fb35e00f96aa18abb69d35912c9e119d
parent bfc85eab1213fcb5d6db2c12f193178773ba205c
Author: Chris Kipp <ckipp@pm.me>
Date:   Tue, 31 May 2022 13:19:45 +0200

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`.

Diffstat:
Mruntime/lua/vim/lsp/handlers.lua | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua @@ -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