Skip to content

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

Open
dlyongemallo wants to merge 1 commit into
mainfrom
diff1_inline_char_hl
Open

fix(inline): derive unified diff1_inline char highlight from DiffText#209
dlyongemallo wants to merge 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.

Also define the inline groups with explicit rather than default so they refresh on ColorScheme instead of pinning the value derived at the first setup().

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

…ext`

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

Restores the `DiffText` source used before #171 while keeping the `fg`,
so tree-sitter syntax foreground still composes through the overlay.

Defines the inline groups with `explicit` rather than `default` so
they refresh on `ColorScheme` instead of pinning the value derived at
the first `setup()`.
@dlyongemallo dlyongemallo force-pushed the diff1_inline_char_hl branch from f1a9abb to 1f43990 Compare May 29, 2026 13:17
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