Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show line-break visualization if the surrounding lines are not also newly added/removed #1923

Open
holly-hacker opened this issue Oct 16, 2023 · 0 comments

Comments

@holly-hacker
Copy link

holly-hacker commented Oct 16, 2023

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.

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

No branches or pull requests

1 participant