After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623076 - Diff offset by one line
Diff offset by one line
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: filediff
git master
Other Linux
: Normal normal
: ---
Assigned To: Stephen Kennedy
Stephen Kennedy
Depends on:
Blocks:
 
 
Reported: 2010-06-28 22:00 UTC by Olivier
Modified: 2010-07-26 08:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
diff offset by one line (132.08 KB, image/png)
2010-06-28 22:00 UTC, Olivier
Details
file on the left pane of the previous screenshot (53.05 KB, application/octet-stream)
2010-06-28 22:03 UTC, Olivier
Details
file on the right pane of the previous screenshot (37.39 KB, application/octet-stream)
2010-06-28 22:03 UTC, Olivier
Details

Description Olivier 2010-06-28 22:00:35 UTC
Created attachment 164845 [details]
diff offset by one line

Please see the attached screenshot because I don't know how to explain clearly the problem :).

Note how the "int twx=gs->winx;" line is wrongly highlighted in blue in the right pane. It is the line below it that should be highlighted.

Starting from this line, all highlighted lines are offset by one line.

This happens in 1.3.1 and 1.3.2 (git ea260a6a0be128a1b95f5f9cc9bf82b153139dfd, Date:   Sat Jun 26 18:23:20 2010 +0900).

I tried to shorten the files being compared to produce a simpler test case, but it seemed to produce other comparison problems... I'll attach the files below.
Comment 1 Olivier 2010-06-28 22:03:17 UTC
Created attachment 164846 [details]
file on the left pane of the previous screenshot
Comment 2 Olivier 2010-06-28 22:03:51 UTC
Created attachment 164847 [details]
file on the right pane of the previous screenshot
Comment 3 Kai Willadsen 2010-06-29 22:06:53 UTC
So I can't reproduce this here. However, it looks like it might be the bug with CRLF in an unfortunate position, described here:
  http://mail.gnome.org/archives/meld-list/2010-June/msg00000.html
Could you please test the patch there and see if it fixes your problem?

If it does, I'd also like to know your setup (distribution, gtk+ and gtksourceview versions, etc.) since it's really odd that I can't reproduce it.
Comment 4 Olivier 2010-06-30 01:31:33 UTC
Yes, this patch fixes the problem! Thanks!

As for my setup:
- Arch Linux (i686)
- glib2 2.24.1-1
- gtk2 2.20.1-2
- pygtk 2.17.0-1
- no gtksourceview installed.
- python 2.6.5-3
- pycairo 1.8.8-1
- pygobject 2.21.3-1
- libglade 2.6.4-1

I have copied the git version of meld to my /home and run bin/meld from there, while 1.3.1 from the Arch repo is installed in /usr. The about box when I run it from home does state "1.3.2".

I have "Leading whitespace" checked in the preferences, but I tried without it and the bug was still there.
Comment 5 Kai Willadsen 2010-07-26 08:41:16 UTC
I've just pushed the patch to Git HEAD, so this should be fixed now. Thank you for your bug report.