Skip to content

fix(highlight): omit DiffsClear bg on transparent themes#179

Merged
barrettruth merged 1 commit intomainfrom
fix/diffsclear-transparent-bg
Mar 8, 2026
Merged

fix(highlight): omit DiffsClear bg on transparent themes#179
barrettruth merged 1 commit intomainfrom
fix/diffsclear-transparent-bg

Conversation

@barrettruth
Copy link
Owner

Problem

#178 set DiffsClear.bg to a dark fallback (#1a1a1a) on transparent themes, painting a visible solid rectangle where the terminal background should show through.

Solution

Only set DiffsClear.bg when Normal.bg is defined. Body lines are already protected by line_hl_group (DiffsAdd/DiffsDelete), which stacks above hl_group bg regardless of priority — DiffsClear.bg is redundant there. The only site where it matters is combined/email-quoted diff headers, an acceptable tradeoff.

Problem: #178 set `DiffsClear.bg` to a dark fallback (`#1a1a1a`) on
transparent themes, painting a visible solid rectangle where the
terminal background should show through.

Solution: only set `DiffsClear.bg` when `Normal.bg` is defined.
Body lines are already protected by `line_hl_group` (`DiffsAdd`/
`DiffsDelete`), which stacks above `hl_group` bg regardless of
priority.
@barrettruth barrettruth merged commit c7cd8fc into main Mar 8, 2026
7 checks passed
@barrettruth barrettruth deleted the fix/diffsclear-transparent-bg branch March 8, 2026 20:08
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