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 595518 - Editing file causes sync to break
Editing file causes sync to break
Status: RESOLVED DUPLICATE of bug 584342
Product: meld
Classification: Other
Component: filediff
1.2
Other Linux
: Normal major
: ---
Assigned To: Stephen Kennedy
Stephen Kennedy
Depends on:
Blocks:
 
 
Reported: 2009-09-17 22:42 UTC by lukeletters
Modified: 2009-09-24 04:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
First file to compare (4.40 KB, text/xml)
2009-09-24 04:05 UTC, lukeletters
Details
Second file to compare (4.41 KB, text/xml)
2009-09-24 04:06 UTC, lukeletters
Details

Description lukeletters 2009-09-17 22:42:38 UTC
To reproduce:

1. Compare two files with Meld
2. In one of the edit panes, delete some text.
3. Save the modified file

You should now see that the sync is broken, so that scrolling is not synchronized and the diffs don't line up properly any more.

I find this a major annoyance.  Refresh / Reload menuitems seem to make no difference, and I have to quit and reopen to continue comparing the files.


Some system info:

$ lsb_release -a
LSB Version:	core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:cxx-3.0-ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:cxx-4.0-ia32:cxx-4.0-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:desktop-4.0-ia32:desktop-4.0-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:graphics-4.0-ia32:graphics-4.0-noarch:qt4-3.1-ia32:qt4-3.1-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 9.04
Release:	9.04
Codename:	jaunty

$ meld --version
meld 1.2

$ dpkg -l meld
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                    Version                 Description
+++-=======================-=======================-==============================================================
ii  meld                    1.2-0ubuntu1            graphical tool to diff and merge files
Comment 1 Kai Willadsen 2009-09-21 08:26:34 UTC
I can't reproduce this on 1.2 or later versions. Can you be more specific about the actions to reproduce (e.g., how you delete the text), and what sync-being-broken looks like? Also, can you run Meld from the command line and see if any tracebacks are printed?
Comment 2 lukeletters 2009-09-24 04:05:29 UTC
Created attachment 143861 [details]
First file to compare
Comment 3 lukeletters 2009-09-24 04:06:02 UTC
Created attachment 143862 [details]
Second file to compare
Comment 4 lukeletters 2009-09-24 04:06:37 UTC
(In reply to comment #1)
> I can't reproduce this on 1.2 or later versions. Can you be more specific about
> the actions to reproduce (e.g., how you delete the text), and what
> sync-being-broken looks like? Also, can you run Meld from the command line and
> see if any tracebacks are printed?

Hmm, I've had this bug a lot of times, but it seems my instructions to reproduce are not correct, I can't now reproduce this consistently using the above instructions.  It must depend on the files compared, but I forgot to note these.

However, it seems I can reproduce the error using these steps:

1. Compare files 1.xml and 2.xml (attached)
2. Scroll to line 89
3. Place cursor on beginning of line
4. Press backspace
5. Save modified file with Ctrl+S
6. Press Ctrl+Shift+R to reload
7. Note that panes are no longer in sync.
Comment 5 Kai Willadsen 2009-09-24 04:17:37 UTC
In steps 2-5, which file are you doing this to?

The only odd thing I see when doing this (with git head) is that if I reload using Ctrl+Shift+R (rather than the menu item), then one pane is in the correct position when reloaded, while the other is at the top of the file. However, the sync fixes itself as soon as I scroll. I think this problem occurs because holding down Shift (deliberately, though it's a very hidden feature) unlocks the scroll sync. Earlier versions of Meld (maybe including 1.2) had some issues with releasing Shift not restarting the scroll sync.

Does just holding down shift unlock the sync irrevocably? If so, you may be seeing bug 584342.
Comment 6 lukeletters 2009-09-24 04:24:41 UTC
I was doing those steps on 1.xml, sorry.

However, indeed it's the shift key that causes the issue.  Funny how I'd only noticed it with saving/reloading.

Fantastic, it's great to know what's going on, thanks!
Comment 7 lukeletters 2009-09-24 04:25:57 UTC
Indeed, this seems to be the issue.

*** This bug has been marked as a duplicate of bug 584342 ***