Compare by content: wrap long lines

Here you can propose new features, make suggestions etc.

Moderators: Stefan2, white, sheep, Hacker

Post Reply
e_gold
Junior Member
Junior Member
Posts: 2
Joined: 2011-12-14, 10:35 UTC
Location: Tuebingen, Germany

Compare by content: wrap long lines

Post by *e_gold » 2011-12-14, 11:27 UTC

The present version of "File|Compare by content" is not very useful if one needs to compare text files with very long lines. I very often write text files (actually TeX files) where the whole paragraph is actually a long single line. My editor just wraps it as I reach the end of the window NOT INSERTING HARD BREAKS (new line character(s)) into file itself. This is very useful because if I edit the text, it will be wrapped automatically (I do not need to care about (re)formatting/deleting/reinserting line breaks).

If I try to compare two versions of such files using "File|Compare by content", TC shows which lines are different, but the differences are not visible as they are far away behind the right edge of left and right window.

Suggestions 1: can TC word wrap long lines when it shows them in comparison window? Corresponding check box would be great!

Suggestions 2: Can TC treat new-line character like space? More exactly, one new_line=space, more then one new+line = new paragraph.
The software can only get beta ;-)

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2011-12-14, 15:24 UTC

The compare tool in TC is line-based. It couldn't handle very long lines well even if it did word wrapping. The comparison calculates a checksum (hash) for each line, and then compares the hashes. With long paragraphs, the chance would be high that there would be no (or very few) line matches between the two files.

Maybe a different compare tool can do what you need? Try e.g. "beyond compare" or "Winmerge". You can define a compare tool in wincmd.ini with the line
CompareTool=c:\path\toolname.exe
Author of Total Commander
http://www.ghisler.com

e_gold
Junior Member
Junior Member
Posts: 2
Joined: 2011-12-14, 10:35 UTC
Location: Tuebingen, Germany

Post by *e_gold » 2011-12-14, 16:21 UTC

Christian,

They both do not provide word wrap either. But listen, what is needed is pretty simple: it does not affect the way how comparison is done! It only affects the way how the text is SHOWN after comparison. So instead of

Code: Select all

| 100: blah                          | 100: blah                          |
| 101: text text text text text text | 101: text text text text text text |
| 102: blah                          | 102: blah                          |
with no visible differences in line 101 ('|' represents the window boundary and the text is actually much longer than the window width) I would like to have the following representation

Code: Select all

| 100: blah                          | 100: blah                          |
| 101: text text text text text text | 101: text text text text text text |
|      text NEW RED TEXT text text   |      text text text text text text |
|      text text text                |                                    |
| 102: blah                          | 102: blah                          |
Is it possible to implement?

The number of corrections is usually small, so NOT every long line (paragraph) is different.
The software can only get beta ;-)

User avatar
MVV
Power Member
Power Member
Posts: 8282
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2011-12-14, 16:36 UTC

I agree that it would be better to split long lines in compare panels. Sometimes it is too hard to see little difference if line is too long.

User avatar
petermad
Power Member
Power Member
Posts: 8420
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2011-12-14, 23:14 UTC

What e_gold suggests seems like a nice feature to have.

Until then I use Lucida Console size 7 in the CbC tool - it is just readable and shows a lot of text.
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1903) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b5 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
Flint
Power Member
Power Member
Posts: 3168
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2011-12-15, 14:13 UTC

e_gold wrote:They both do not provide word wrap either.
WinMerge definitely does.

However, if CbC supported word wrapping it would be really nice.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21a / Win7 x64 SP1, Win10 x64

Octagon
Junior Member
Junior Member
Posts: 44
Joined: 2010-06-09, 20:05 UTC

Post by *Octagon » 2012-01-07, 18:41 UTC

ghisler(Author) wrote:The compare tool in TC is line-based.
Not exactly. There is a binary comparison option. I wonder why nobody proposed that, since I do not see, even theoretically, any better way out for the original problem.

I do not know if the "Ignore repeated spaces" and "Case sensitive" options work in the binary mode, but I guess they should.

Replacing "Ignore repeated spaces" with "Ignore repeated whitespace" and specifying what exactly is whitespace, including EOL symbols, may be very handy in special cases.

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2014-03-22, 03:33 UTC

Wrapping lines in CBC would be great.

oshizelly
Junior Member
Junior Member
Posts: 60
Joined: 2013-09-07, 13:51 UTC

Post by *oshizelly » 2014-04-25, 13:59 UTC

Wrapping lines as and option in Compare by content window may be simply useful for binary files. But this feature is absolutely necessary to compare text files. Have anybody any ideas, for what reason Christian does does not like the idea of adding this option to save those users, who needs it?
This argument ( http://www.ghisler.ch/board/viewtopic.php?p=237222&sid=d2f6be429af5fc95925cda6ba4c003b0#237222 )does not seem to be very convenient for me, is there are any hidden considerations ;)

HBB
Senior Member
Senior Member
Posts: 295
Joined: 2008-05-05, 21:31 UTC

Post by *HBB » 2014-04-27, 14:57 UTC

I support this suggestion too.

Due to the reasons of Author, instead of expanding all lines, at least, a double-click action which expands/collapse the line under the cursor may help.

billiebub
Member
Member
Posts: 179
Joined: 2011-04-12, 19:49 UTC

Post by *billiebub » 2014-05-04, 01:07 UTC

definitely support this feature. It gets rather frustrating when having to scroll horizontally trying to find the changed characters. Even more frustrating when the lines are very very long

TW
Senior Member
Senior Member
Posts: 337
Joined: 2005-01-19, 13:35 UTC

Post by *TW » 2014-05-04, 21:26 UTC

support from me too.

just try to compare firefox' addons.js for example. it's all in one line... it's almost impossible to find the differences using cbc.
licenced and happy TC user since 1994 (#11xx)

Cars10
Junior Member
Junior Member
Posts: 6
Joined: 2014-05-14, 07:57 UTC
Location: Darmstadt, Germany

Post by *Cars10 » 2014-05-14, 08:01 UTC

Yes, I have this trouble many, many times as well. This would be a tremendous improvement.

Hammillian7
Junior Member
Junior Member
Posts: 84
Joined: 2003-07-16, 22:40 UTC
Location: Spain

Strong support by myself

Post by *Hammillian7 » 2014-06-19, 13:58 UTC

I also strongly vote for this option: showing long lines as wrapped would solve the problem that I suffer daily when comparing my C files.
Thanks,
Jose

Galaxy S7 Edge with Android 7.0
Still struggling to resist with Windows XP

fgnievinski
Junior Member
Junior Member
Posts: 11
Joined: 2011-11-10, 02:34 UTC

Re: Compare by content: wrap long lines

Post by *fgnievinski » 2019-07-27, 23:15 UTC

the request is simply to make the horizontal scrollbar optional instead of being mandatory.
that way, the user can adjust the textbox width simply resizing the entire window.

Post Reply