desktop / desktop

Focus on what matters instead of fighting with Git.
https://desktop.github.com
MIT License
19.67k stars 9.39k forks source link

Can we have the ability to turn off text wrap for new side-by-side diff? #11052

Open aybe opened 3 years ago

aybe commented 3 years ago

Describe the feature or problem you’d like to solve

Text wrapping on side-by-side diff can make things more difficult to read in some cases.

Proposed solution

Allow to disable text-wrap on side by side diffs.

Then of course you'd have to implement synchronized scrollbars for both views.

For the latter, it'd be even great if this could be controlled using the mouse wheel button.

Additional context

GitHubDesktop_2020-11-17_17-10-22

steveward commented 3 years ago

Requested in https://github.com/desktop/desktop/issues/11253:

Describe the feature or problem you’d like to solve The change diff viewer currently wraps lines, without an option to disable this functionality. I've never seen a diff tool or any tool dealing with code that wraps lines, but wrapping being present in Desktop makes me realize there are many situations wrapping diffs and code is not ideal.

Proposed solution If line wrapping were optional, code could remain formatted as intended, readability (for us mortals) would no longer be hindered, differing characters could be compared directly in close spatial context (vs across multiple lines), and more lines could be represented in the view. Even a compromise of only wrapping on whitespace, some selection of stop characters, or something else the grammar of the detected language informs would help readability (comprehension and speed), since users would no longer have to mentally stitch together mid-word breaks.

caendesilva commented 1 year ago

I also would love this. Helps especially on small screens! I was surprised to not see this in the gearbox dropdown menu. image

PKPublicCode commented 1 year ago

2.5 years later...

Any updates on this issue? What's conclusion and what's ETA? Current implementation is not usable.

dima954844 commented 1 year ago

сб, 17 черв. 2023 р., 14:40 користувач P.K. @.***> пише:

2.5 years later...

Any updates on this issue? What's conclusion and what's ETA? Current implementation is not usable.

— Reply to this email directly, view it on GitHub https://github.com/desktop/desktop/issues/11052#issuecomment-1595719869, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7QMU4QWSGT5VBZ726DGNLDXLWJT3ANCNFSM4TYY6W6Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MarcMouallem commented 1 year ago

Any update? With everyone on MacBook Airs these days, this is a basic need.

dustinlineweber commented 1 year ago

I'd argue that forcing line wrapping is a really bad idea for the Unified Diff view as well. Especially for code files, since line terminations can have an effect in some languages and definitely (in all languages) formatting is done with strong intention.

If anyone is wrapping code for the benefit of viewing, they have done so manually in a well-chosen spot. Wrapping in a random spot will usually be terrible.

vivarose commented 1 year ago

Maybe someone should fork the repo and get this done.

turbanisch commented 4 months ago

Yes, please!