Skip to content

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

Description

@jacegodk

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 #1053 (comment).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions