Skip to content

Keep syntax highlighting visible in edit diffs across themes#193

Merged
dnouri merged 1 commit intomasterfrom
fix/theme-derived-edit-diff-faces
Apr 18, 2026
Merged

Keep syntax highlighting visible in edit diffs across themes#193
dnouri merged 1 commit intomasterfrom
fix/theme-derived-edit-diff-faces

Conversation

@dnouri
Copy link
Copy Markdown
Owner

@dnouri dnouri commented Apr 18, 2026

Before this change, edit diffs reused Emacs diff faces for whole lines.
In themes that give those faces strong foreground colors, that could wash
out the syntax highlighting inside the diff and make code harder to read.

Now added and removed edit lines use theme-derived background tints while
keeping the +/- indicators from diff-mode. That preserves syntax colors
inside hot edit diffs, keeps the result consistent across dark and light
themes, and gives failed tool blocks the same treatment.

Tests cover theme-derived face selection, background-only overlays, and
the regression where syntax highlighting must remain visible under edit
diff overlays.

@dnouri dnouri force-pushed the fix/theme-derived-edit-diff-faces branch from 0e21cea to 3f7df02 Compare April 18, 2026 17:01
@dnouri dnouri changed the title Preserve syntax colors in edit diffs across themes Apr 18, 2026
Before this change, edit diffs reused Emacs diff faces for whole lines.
In themes that give those faces strong foreground colors, that could wash
out the syntax highlighting inside the diff and make code harder to read.

Now added and removed edit lines use theme-derived background tints while
keeping the +/- indicators from diff-mode. That preserves syntax colors
inside hot edit diffs, keeps the result consistent across dark and light
themes, and gives failed tool blocks the same treatment.

Tests cover theme-derived face selection, background-only overlays, and
the regression where syntax highlighting must remain visible under edit
diff overlays.
@dnouri dnouri force-pushed the fix/theme-derived-edit-diff-faces branch from 3f7df02 to d4d1a6c Compare April 18, 2026 17:08
@dnouri dnouri merged commit a07e1d0 into master Apr 18, 2026
11 checks passed
@dnouri dnouri deleted the fix/theme-derived-edit-diff-faces branch April 18, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant