tc75pb7: Compare By Content/Wrong highlighting in txt mode

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Heppchen
Junior Member
Junior Member
Posts: 39
Joined: 2009-07-01, 23:51 UTC
Location: Germany

tc75pb7: Compare By Content/Wrong highlighting in txt mode

Post by *Heppchen »

If only the last but two letter of one row is different to comparing one, all last three letters are highlighted into red as difference instead on one single letter. This is not repro after switching to binary view.

Repro steps in text mode of compare by content:

file1.txt (ANSI, Unicode, it does not matter) contains:
1234567890

file2.txt contains:
1234567990

Differences:
1234567890

This is also repro when the last but one is only different.

1234567890 <-> 1234567800

As it's not repro in binary view, therefore the bug seems to be introduced in text mode comparer.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Confirmed, TC7.50pb7. Already there in 7.04a.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This isn't a bug, compare looks for insertions and deletions, it doesn't compare by by byte. Also single identical characters are partly ignored by the algorithm to avoid that only single characters of an inserted word are matched, which would completely rip apart a text.
Author of Total Commander
https://www.ghisler.com
Heppchen
Junior Member
Junior Member
Posts: 39
Joined: 2009-07-01, 23:51 UTC
Location: Germany

Post by *Heppchen »

ghisler(Author) wrote:This isn't a bug, compare looks for insertions and deletions, it doesn't compare by by byte. Also single identical characters are partly ignored by the algorithm to avoid that only single characters of an inserted word are matched, which would completely rip apart a text.
But it's strange that the highlighting does not work properly only for the last but two letters of one single line.

Moreover it's not repro in binary view.

But it's a minor bug indeed which I didn't recognize in the past.
Post Reply