Skip to content

Commit

Permalink
fix: execute codeaction with 'o' in diagnostic (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitfz810 authored May 29, 2024
1 parent 59d4648 commit e646183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/lspsaga/diagnostic/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e646183

Please sign in to comment.