fix(lsp): fix multi client handling in code action (#18869)

Fixes https://github.com/neovim/neovim/issues/18860
This commit is contained in:
Mathias Fußenegger
2022-06-05 16:43:32 +02:00
committed by GitHub
parent 214f866fe5
commit e4df1c9b9e
3 changed files with 76 additions and 1 deletions

View File

@@ -752,7 +752,14 @@ local function on_code_action_results(results, ctx, options)
enriched_ctx.client_id = client.id
fn(command, enriched_ctx)
else
M.execute_command(command)
-- Not using command directly to exclude extra properties,
-- see https://github.com/python-lsp/python-lsp-server/issues/146
local params = {
command = command.command,
arguments = command.arguments,
workDoneToken = command.workDoneToken,
}
client.request('workspace/executeCommand', params, nil, ctx.bufnr)
end
end
end