Annoying misalignment

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
MSpagni
Expert Member
Posts: 537
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Annoying misalignment

Post by MSpagni »

While comparing a couple of c files with the "ignore comments" option checked, I met an odd and unexpected misalignment.
The manual correction is easy but I don't understand why EDP can't do it automatically.
If they are many the thing becomes quickly annoying.

For your convenience I add a screenshot and the two c snippets.
Attachments
Cfiles.zip
(1006 Bytes) Downloaded 555 times
Clipboard.jpg
Clipboard.jpg (83.53 KiB) Viewed 9108 times
User avatar
psguru
Site Admin
Posts: 2228
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Annoying misalignment

Post by psguru »

This is what I get. Obviously, our options do not match.
ExamDiff 1.png
ExamDiff 1.png (154.47 KiB) Viewed 9105 times
psguru
PrestoSoft
MSpagni
Expert Member
Posts: 537
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Annoying misalignment

Post by MSpagni »

Obvious! What else? :roll:
Please find my config here attached.
Attachments
Settings.zip
(37.76 KiB) Downloaded 568 times
User avatar
psguru
Site Admin
Posts: 2228
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Annoying misalignment

Post by psguru »

Thanks, we'll look into this. It's tricky though, and we may not have a good solution (there's a way to explain your results but I'm not going to get into that). One way to make this look better is to ignore blank lines.
psguru
PrestoSoft
User avatar
psguru
Site Admin
Posts: 2228
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Annoying misalignment

Post by psguru »

After some analysis, it appears that EDP works correctly. In your example, since blank lines are not ignored, lines 15 (which becomes blank after ignoring C-style comments) and 13 are matched as identical (both are blank), and all ignored lines are misaligned as a result of this.

To make a more obvious case, take a look at the slightly modified example:
ExamDiff 2.png
ExamDiff 2.png (156.99 KiB) Viewed 9068 times
The same lines are aligned but this time the alignment is more obvious.
psguru
PrestoSoft
MSpagni
Expert Member
Posts: 537
Joined: Mon Mar 30, 2009 12:53 am
Location: Italy

Re: Annoying misalignment

Post by MSpagni »

Gosh, I must say that I had to wait a moment of calm to grasp what you were saying.
I admit that, as expected, there is a logic behind it, but let me say it's far from intuitive.
User avatar
psguru
Site Admin
Posts: 2228
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Annoying misalignment

Post by psguru »

Well, no everything is intuitive in this world, unfortunately.
psguru
PrestoSoft
Post Reply