Skip to content

Reference revision diff highlights - #235

Merged
dgutov merged 25 commits into
masterfrom
reference-revision-highlights
Sep 10, 2025
Merged

Reference revision diff highlights#235
dgutov merged 25 commits into
masterfrom
reference-revision-highlights

Conversation

@dgutov

@dgutov dgutov commented Apr 5, 2025

Copy link
Copy Markdown
Owner

This splits highlighting into two groups: diff between the buffer contents and HEAD (or staging area (*)), and diff between the latter and diff-hl-reference-revision (if set). Looks like this:

diff-hl-references-highlights

The new indicators use a specific bitmap and new faces, both of which can be customized. The default bitmap is an empty one, so on the screenshot it's the lines without the "border".

A new fn option is added as well: diff-hl-highlight-reference-function. For more advanced customization.

(*) This change also uses the new indicators for the staged changes (Git only, naturally) when diff-hl-show-staged-changes is customized to nil. In a way that conflates those pieces of data, but I expect that most users will either use one or the other, and the behavior still makes sense when combined.

@dgutov
dgutov marked this pull request as draft April 5, 2025 01:58
@dgutov dgutov changed the title Reference revision highlights Reference revision diff highlights Apr 5, 2025
@dgutov
dgutov force-pushed the reference-revision-highlights branch from 41df159 to eb8933f Compare April 28, 2025 15:13
@dgutov
dgutov marked this pull request as ready for review September 9, 2025 02:14
@dgutov
dgutov merged commit 5446a69 into master Sep 10, 2025
8 checks passed
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