fix: dispatch cancel message on user cancelling request in retry. (#2644)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
brook hong
2025-08-27 12:23:32 +08:00
committed by GitHub
parent 11e457e56b
commit 9fe429eb62
2 changed files with 27 additions and 17 deletions

View File

@@ -1911,7 +1911,7 @@ function Sidebar:clear_history(args, cb)
end
function Sidebar:clear_state()
if self.state_extmark_id then
if self.state_extmark_id and self.containers.result then
pcall(api.nvim_buf_del_extmark, self.containers.result.bufnr, STATE_NAMESPACE, self.state_extmark_id)
end
self.state_extmark_id = nil