Compare by contents: Word wrap

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Compare by contents: Word wrap

Post by *Alextp »

Suggested at forum.wincmd.ru

Would be nice if CBC window will allow to change the Word Wrap mode on/off.
jjk
Member
Member
Posts: 181
Joined: 2003-07-03, 10:41 UTC

Post by *jjk »

Support ++

JJK
User avatar
MacQ
Junior Member
Junior Member
Posts: 72
Joined: 2004-04-13, 12:54 UTC
Location: Slovenia

Post by *MacQ »

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

Post by *ghisler(Author) »

The problem is that the wrapped lines would not be in sync between left and right side. Immagine a 100 word paragraph wrapped to several lines. The left and right lines would quickly get out of sync if one side contains additional words at the beginning of that paragraph...
Author of Total Commander
https://www.ghisler.com
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

..
Last edited by Alextp on 2007-06-21, 16:12 UTC, edited 2 times in total.
User avatar
MacQ
Junior Member
Junior Member
Posts: 72
Joined: 2004-04-13, 12:54 UTC
Location: Slovenia

Post by *MacQ »

Yes, that's true, but the differences would still be highlighted. The comparing process can still be made in single line, but the wrap could be just visual, e.g. wouldn't change nothing or trigger another compare.

Word wrap would be useful so you don't have to slide for 3 or more screens. It becomes very confusing sometimes as you have to go back and check if you missed something.

The comparission would be made without the wrap, but an option to just turn the wrap on for just this comparission, which would be gone when you close the window, would be great.

Please try to do it and we can test it then.
Who doesn't like it, wouldn't use it.
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ghisler(Author)
Other programs can handle this. For example, Compare It! just shows empty space (filled with crossed lines) where line from one side is shorter than the corresponding line from another side.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
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 »

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: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
https://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 »

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: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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: 15999
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

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 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

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 11.03 / Win10 x64
Octagon
Junior Member
Junior Member
Posts: 44
Joined: 2010-06-09, 20:05 UTC

Post by *Octagon »

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 »

Wrapping lines in CBC would be great.
Post Reply