Skip to content

fix(highlight): repaint after filetype retry - #434

Merged
barrettruth merged 1 commit into
mainfrom
fix/filetype-retry-highlights
Sep 16, 2026
Merged

barrettruth merged 1 commit into
mainfrom
fix/filetype-retry-highlights

Conversation

@barrettruth

Copy link
Copy Markdown
Owner

Problem

A generated review can contain a hunk whose filetype is unknown while
did_filetype() is nonzero. The scheduled retry invalidates the cache and
supersedes the deferred syntax job. Its bare redraw does not run the
decoration provider’s on_buf, so pending_clear remains set. The review
then shows diff backgrounds without language syntax until :edit.

Solution

Rebuild the cache and process pending_clear inside the scheduled retry
before redraw!. The redraw now sees current hunks and an empty highlighted
set, so it schedules language syntax immediately.

@barrettruth
barrettruth merged commit 0de2d75 into main Sep 16, 2026
5 checks passed
@barrettruth
barrettruth deleted the fix/filetype-retry-highlights branch September 16, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant