#1103·hunk

Let syntax-painted file-view rows opt into the added/removed background

Author: jacegodkCreated Sep 14, 2026Updated Sep 14, 2026

What do you want to change?

Follow-up to #1023 / #1053. A file-view span with syntax gets token colors that replace its tone, and file-view rows are painted only on theme.selectedHunk or theme.panel. So a diff-presenting view (whole file with unlimited context, blame, side-by-side) has no way to show that a syntax-painted row is added or removed: the +/- marker is the only signal left. The raw diff carries that signal in the row background.

Proposal: a row-level opt-in such as background?: "added" | "removed" on ExtensionFileViewRow, painted under the token colors with the same tint the raw diff uses for that line kind, and layered under the selected-hunk and cursor-row backgrounds hunk already owns. Paint-only, no geometry change. A span-level variant would also work for split rows that show old and new in one row.

Why?

hunk-viewed's full-file view (https://github.com/jacegodk/hunk-viewed) now declares code documents, but has to leave added and removed rows unpainted and in solid tone, otherwise changes disappear into the context. See https://github.com/modem-dev/hunk/pull/1053#issuecomment-5629854502.