Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lua/copilot/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ function panel:refresh()
params.position.character = params.doc.position.character
end

-- on_solutions_done can be invoked before the api.get_panel_completions callback
self.state.status = "loading"

local _, id = api.get_panel_completions(
self.client,
params,
Expand All @@ -481,7 +484,6 @@ function panel:refresh()
return
end

self.state.status = "loading"
self.state.expected_count = result.solutionCountTarget
panel:unlock():refresh_header():lock()
end
Expand Down