-
Notifications
You must be signed in to change notification settings - Fork 24
Description
My Use Case
(Since it's a bit hard to describe what I'm looking for without context.)
At a high level, I simply want my eyes to be naturally drawn to the relevant parts of modified lines.
When looking at a diff, I want changed lines to be highlighted green/red as usual.
However, for "modified" lines (i.e. lines which are not added or removed in full) I want to put more emphases on the specific parts of the line that have changed.
Sort of "double-highlighting", first highlighted green/red because the line is added/removed, then highlighted even more because this part of the line is what actually changed.
However, I don't want this "double-highlighting" to apply to new or removed lines, only modified lines.
Currently Targetable --color Faces:
Currently there are two main color pallets which can be customized:
added/removed, which applies to entire lines, andrefine-added/refine-removed, which applies to any added or removed text (within either a modified line or fully added/removed line).
refined-added and refined-removed are currently applied to completely added or completely removed lines.
For my use case above, it's not currently possible to target changed sections within changed lines, without affecting purely added/removed lines.
Proposal
I suggest the following two targetable --color faces:
unchanged-addedandunchanged-removed- for the parts of modified lines which are not changed, andonly-addedandonly-removed- for lines which are added/removed in full.
With these, it would be possible to separate full-line changes from changes withing lines, and color each individually.
And for purely backwards-compatibility reasons:
unchanged-added/unchanged-removedshould inherit fromadded/removed, andonly-added/only-removedshould inherit fromrefine-added/refine-removed.
If all options were specified, then added/removed would only apply to the +/- at the start of each line (and probably leading whitespace).
(One more note: I've described everything above as added/removed vs changed lines, but it may be more appropriate to implement this on changed blocks instead.)
Thoughts?