bug: duplicate extmarks from two-pass rendering #143
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/diffs.nvim#143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The decoration provider's two-pass rendering (pass 1: line backgrounds + intra-line; pass 2: deferred treesitter) produces duplicate extmarks on some hunk lines. Observed in a debug dump of
email_quote_demo.diff:> + pass): twoDiffsAddextmarks, twoDiffsAddNr, twoDiffsAddText+ pass): same duplication on the non-quoted equivalentBoth the quoted and non-quoted hunks exhibit this, so it's unrelated to email quote parsing — it's a pre-existing issue in the two-pass pipeline.
Pass 2 likely reapplies line backgrounds and intra-line diffs that pass 1 already set, without clearing pass 1's extmarks first (or clearing per-hunk ranges but missing some).
Impact
Functionally harmless (duplicate extmarks with same priority/hl_group are visually identical), but doubles the extmark count unnecessarily and could matter for large buffers with many hunks.