Skip to content

Commit e646183

Browse files
authored
fix: execute codeaction with 'o' in diagnostic (#1453)
1 parent 59d4648 commit e646183

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lua/lspsaga/diagnostic/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ function diag:code_action_cb(action_tuples, enriched_ctx, win_conf)
158158
end
159159

160160
util.map_keys(self.float_bufnr, diag_conf.keys.exec_action, function()
161-
self:close_win()
162161
self:do_code_action(action_tuples, enriched_ctx)
163162
end)
164163

@@ -210,8 +209,9 @@ function diag:do_code_action(action_tuples, enriched_ctx)
210209
return
211210
end
212211
if action_tuples[num] then
213-
act:do_code_action(num, action_tuples[num], enriched_ctx)
214-
self:close_win()
212+
local action = action_tuples[num][2]
213+
local client = lsp.get_client_by_id(action_tuples[num][1])
214+
act:do_code_action(action, client, enriched_ctx)
215215
end
216216
self:clean_data()
217217
end

0 commit comments

Comments
 (0)