Page 1 of 1
Annoying misalignment
Posted: Fri Jul 08, 2016 1:58 pm
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.
Re: Annoying misalignment
Posted: Fri Jul 08, 2016 2:51 pm
by psguru
This is what I get. Obviously, our options do not match.

- ExamDiff 1.png (154.47 KiB) Viewed 12865 times
Re: Annoying misalignment
Posted: Sat Jul 09, 2016 1:22 am
by MSpagni
Obvious! What else?

Please find my config here attached.
Re: Annoying misalignment
Posted: Sat Jul 09, 2016 3:24 pm
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.
Re: Annoying misalignment
Posted: Thu Jul 14, 2016 5:15 pm
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 (156.99 KiB) Viewed 12828 times
The same lines are aligned but this time the alignment is more obvious.
Re: Annoying misalignment
Posted: Sat Jul 23, 2016 7:54 am
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.
Re: Annoying misalignment
Posted: Sat Jul 23, 2016 8:41 am
by psguru
Well, no everything is intuitive in this world, unfortunately.