kesavanpos / tortoisesvn

Automatically exported from code.google.com/p/tortoisesvn
0 stars 0 forks source link

Multiline diffs #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some machine generated files have overly long lines, e.g. xml files, sql
scripts.

TortoiseMerge should have an option to wrap those long lines but still be
able to show the diffs.

To determine:
* how to split the lines? Fixed length? Window border?
* split both views at the same length?

Original issue reported on code.google.com by tortoisesvn on 16 Mar 2010 at 7:05

GoogleCodeExporter commented 9 years ago
* Notepad, Wordpad, etc. split long lines at window border and re-split them on
window resize. That's correct behaviour.
* TortoiseMerge has 2 windows, so on start & on their resizing it must calculate
their minimum width: MIN(Left_width, Right_width), and split texts in both 
windows
into parts of this length.
* Usual text editors try to wrap text on word-breaks. For TortoiseMerge, this 
feature
is not required.

Original comment by kuzuru...@gmail.com on 17 Mar 2010 at 9:23

GoogleCodeExporter commented 9 years ago

Original comment by tortoisesvn on 18 Mar 2010 at 8:55

GoogleCodeExporter commented 9 years ago
This would come in handy when using TortoiseSVN for writing documentation in 
which you 
don't want to hard-wrap paragraphs.

Original comment by cronos...@gmail.com on 20 Apr 2010 at 10:32

GoogleCodeExporter commented 9 years ago
I also missed this feature today. Using the vertical scrollbar was annoying.

Original comment by jonsmit1...@gmail.com on 21 May 2010 at 3:24

GoogleCodeExporter commented 9 years ago
a behavior similar to kdiff3 would be very handy. just to add another example 
where the current non-wrapping behavior of tortoisemerge is annoying: tex-files 
(hard word wraps are usually only used when separating paragraphs).

Original comment by jonas.tr...@gmail.com on 13 Jul 2010 at 12:14

GoogleCodeExporter commented 9 years ago
rejected ideas:
* using a separate CDiffView which has the lines wrapped
* using the same CDiffView but with lines wrapped, requiring a reload/refresh 
whenever the wrap limit changes (i.e., on every resize of the window)

these are way too slow and require more than double the memory.

I'm thinking of extending DrawSingleLine() to do the wrapping, returning the 
number of lines drawn (i.e., one for non-wrapped lines, more for wrapped ones).
An array with data that has 'real line -> display line' has to be created on 
every redraw, but this should be quite fast and not use much memory since 
there's a limited number of lines possible to show on screen at the same time, 
usually much less than the number of lines in the whole file.
This of course also requires the conversion of screen-line->real-line and vice 
versa in various places (e.g., mouse actions, cursor stuff, ...)
Not sure yet how to 'sync' the wrapping between the two or three views. If for 
example the left view has only 10 chars but the right one has 200, the right 
one gets split into about 5 lines while the left view only needs one. But in 
that case, the left view also has to draw 5 lines (one with the short line, 
four empty ones) so that the real lines still match.

Just writing down my thoughts for now...

Original comment by tortoisesvn on 15 Jul 2010 at 7:13

GoogleCodeExporter commented 9 years ago
Taking this one. But it will take quite a while to finish.

Original comment by tortoisesvn on 22 Jul 2010 at 5:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r19932.

Original comment by tortoisesvn on 24 Jul 2010 at 1:34

GoogleCodeExporter commented 9 years ago
In which version of tortoisesvn is/will this be included?

Original comment by eamon.nerbonne on 27 Jan 2011 at 7:55

GoogleCodeExporter commented 9 years ago
In 1.7.0

Original comment by tortoisesvn on 27 Jan 2011 at 10:24