Only show line-break visualization if the surrounding lines are not also newly added/removed
Is your feature request related to a problem? Please describe.
With v0.24, a new feature was added where empty lines are always rendered as ¶. When adding a new file or a big chunk of code, this doesn't add much value and is very distracting.
Describe the solution you'd like When viewing a diff, only show the line-break visualization on lines that aren't in the middle of a diff chunk but instead only on lines where it wouldn't otherwise be clear that a newline was added/removed.
For example:
line 1
+line 1.5
+
line 2
This is currently shown as:
line 1
¶
+line 1.5
+¶
line 2
Instead, I'd prefer if this was shown like this:
line 1
+line 1.5
+¶
line 2
The + characters shown here are only for visualization purposes, because diff code blocks don't show color highlighting otherwise.
A larger example (note no ¶ between line d and line e):
line a1
line a2
line b
-line c1
-line c2
-
-line d
-¶
line e
+¶
+line f
This would mean that newly added or removed files would not contain any ¶ markers (unless on the very first or last line), which makes reading them a lot easir.
Describe alternatives you've considered PR #1904 allows disabling line-break visualizations altogether which restores the behavior from v0.23.
Alternatively, a single space with a red or green background could be shown on lines where whitespace or an empty line is added or remove.
Additional context This is related to #1894 and PR #1904 which requests turning off the newline visualization alltogether.