From e646183662b7e9b1f3b9d9616116a6a8167e57ff Mon Sep 17 00:00:00 2001 From: wiser-fz <38970394+Gitfz810@users.noreply.github.com> Date: Wed, 29 May 2024 14:04:55 +0800 Subject: [PATCH] fix: execute codeaction with 'o' in diagnostic (#1453) --- lua/lspsaga/diagnostic/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lspsaga/diagnostic/init.lua b/lua/lspsaga/diagnostic/init.lua index dfa5e976d..b08a035b1 100644 --- a/lua/lspsaga/diagnostic/init.lua +++ b/lua/lspsaga/diagnostic/init.lua @@ -158,7 +158,6 @@ function diag:code_action_cb(action_tuples, enriched_ctx, win_conf) end util.map_keys(self.float_bufnr, diag_conf.keys.exec_action, function() - self:close_win() self:do_code_action(action_tuples, enriched_ctx) end) @@ -210,8 +209,9 @@ function diag:do_code_action(action_tuples, enriched_ctx) return end if action_tuples[num] then - act:do_code_action(num, action_tuples[num], enriched_ctx) - self:close_win() + local action = action_tuples[num][2] + local client = lsp.get_client_by_id(action_tuples[num][1]) + act:do_code_action(action, client, enriched_ctx) end self:clean_data() end