Skip to content

fix(inline): derive unified diff1_inline char highlight from DiffText#209

Merged
dlyongemallo merged 1 commit into
mainfrom
diff1_inline_char_hl
Jun 2, 2026
Merged

fix(inline): derive unified diff1_inline char highlight from DiffText#209
dlyongemallo merged 1 commit into
mainfrom
diff1_inline_char_hl

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

@dlyongemallo dlyongemallo commented May 29, 2026

Changed chars on a paired row sit on a DiffviewDiffChange backdrop, so deriving the overlay from DiffAdd hid them when a colourscheme gave DiffAdd and DiffChange near-identical backgrounds (e.g., tokyonight). Add a DiffviewDiffTextInline group derived from DiffText (as the side-by-side diff does), falling back to DiffAdd when DiffText is unset; overleaf keeps DiffviewDiffAddInline.

This restores the DiffText source used before #171 (which switched it to DiffAdd) while keeping that commit's dropped fg, so tree-sitter syntax foreground still composes through the overlay.

Relates to #205. Overrides the changes in #206.

@dlyongemallo dlyongemallo force-pushed the diff1_inline_char_hl branch 7 times, most recently from a71a41b to 0d948c1 Compare June 2, 2026 04:48
…ext`

Changed chars on a paired row were difficult to distinguish when a
colourscheme gave `DiffAdd` and `DiffChange` near-identical backgrounds
(e.g., `tokyonight`). Adds a `DiffviewDiffTextInline` group derived from
`DiffText`, falling back to `DiffAdd` when `DiffText` is unset; overleaf
keeps `DiffviewDiffAddInline`.

Restores the `DiffText` source used previously while keeping the `fg`,
so tree-sitter syntax foreground still composes through the overlay.
Drops the paired-row backdrop to priority 99 (one below tree-sitter's
default 100) so syntax `fg` wins ties on the row.
@dlyongemallo dlyongemallo force-pushed the diff1_inline_char_hl branch from 0d948c1 to 1103822 Compare June 2, 2026 08:26
@dlyongemallo dlyongemallo merged commit 3d948ae into main Jun 2, 2026
7 checks passed
@dlyongemallo dlyongemallo deleted the diff1_inline_char_hl branch June 2, 2026 08:28
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