Automatically word-wrap very big lines like 1000 characters or more, but not smaller lines like up to 200 characters

Bugged 1 week ago • updated 1 week ago 1

The new feature added on https://smartgit.userecho.com/communities/1/topics/3-compare-show-long-left-and-right-line-above-each-other is useful only for lines up to 200 characters, but still ineffective against very long lines line 1000 characters. 

I personally hate the new vertical line panel which show up eating my scarce vertical screen space. So, the first thing I ever do on a new SmartGit installation is to figure out how to disable that feature, which comes enabled by default.

I agree there is no simple solution when diffing very long lines because enabling word wrap will be bad for long lines line 100~200 characters, because the standard space is by standard constrained, then enabling word-wrap will be more awkward/bad: 

Then I would suggest a feature to only wrap lines which are really by like 1000 characters, and keep the usual lines up to 200 characters not wrapped. Because usually lines up to 1000 characters are not code lines but documentation pages like README.md files or Wiki pages, which are edited on text editors with word-wrap enabled. For example, on SmartGit I would see these documentation lines diff changes very bad:

While on my text editor, they are nicely displayed with the word wrap:

This feature was similarly asked on: 

  1. http://smartgit.3668570.n2.nabble.com/Wrap-Long-Lines-in-Diff-View-td7574045.html
  2. https://smartgit.userecho.com/communities/1/topics/87-changes-view-optionally-wrap-lines

> It's hard to see what changed within a line if it's really long, scrolling is awkward and it's easy to miss a change when doing a review.

The SmartGit team answer was:

> There is no option available to wrap long lines in SmartGit's file compare. You may configure your own file compare which offers this option in the preferences. 

Regarding this, there is this question on StackOverflow about it: https://stackoverflow.com/questions/51756401/use-git-diff-as-diff-algorithm-in-smartgit

It is implicit that feature suggest to wrap all lines at the screen end, this one is about wrapping some lines which are outliers at some limit off the screen.

Wrapping all lines on SmartGit view is not optimal. Would be better only wrap lines which "need" wrapping. For example, assuming our screen can show up to 100 characters without wrapping, and we have some lines with 300 characters, even if 200 characters of them are off the screen, it acceptable a scroll bar for them. 

But for lines up to 1000 characters, where 900 characters are off the screen (in a very long row), a scroll bar for reviewing is useless. Then I would suggest wrapping the lines up to 1000 characters on some limit like 300 characters. Then, for these lines, only 600 characters (1000/300 = 3*300 + 100 -> 3*(300-100) = 600) are off the screen at a time.