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 384767 - Text filters should handle regexes that change multiple lines
Text filters should handle regexes that change multiple lines
Status: RESOLVED OBSOLETE
Product: meld
Classification: Other
Component: filediff
git master
Other All
: Normal normal
: ---
Assigned To: meld-maint
meld-maint
: 696617 709193 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-11 17:36 UTC by Shahar Livne
Modified: 2017-12-13 18:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Shahar Livne 2006-12-11 17:36:23 UTC
Please describe the problem:
For comments which are longer than one line, C comment text filter doesn't do its job.
/* long 
 * comment
 */
All lines are not ignored.

Steps to reproduce:
1. Activate Text Filters -> C comment
2. Compare an empty file and a file with the above C comment


Actual results:
You see that the lines are not ignored (as they are ignored in one line C comment)

Expected results:
I expect to see no difference between the files

Does this happen every time?
Yes

Other information:
Comment 1 Shahar Livne 2006-12-11 17:54:35 UTC
According to:
http://ostermiller.org/findcomment.html
We can change the regex of C comments to:
/\*(.|[\r\n])*?\*/
But it doesn't work for me.
Comment 2 Stephen Kennedy 2006-12-14 00:21:47 UTC
Actually any regex which changes the number of lines in the file won't work. It's tricky to work around. I think this has been reported before and was marked WONTFIX.
Comment 3 Louis Caron 2007-09-17 06:22:48 UTC
Stephen Kennedy provided the following additional information about this bug:
> Hi Louis, there's no workaround at the moment. Diffing breaks if the
> number of lines changes because the diff line numbers don't match the
> real buffer line numbers.
> Thinking about it now, I'm don't know why filediff.py:_filter_text
> doesn't just replace the multiline match with an equivalent number of
> newlines. Can you open a bug for this if one doesn't already exist?
> Regards,
> Stephen.

When I had raised the question on the forum for the same request.
Comment 4 Jack Tanner 2008-03-07 16:57:43 UTC
The earlier discussion on this seems to be bug 159795.
Comment 5 Kai Willadsen 2011-01-14 20:39:33 UTC
Retitling and updating this bug. Unfortunately, this is still quite hard to fix given the way that Meld's incremental updating of diffs works.
Comment 6 Kai Willadsen 2011-03-02 22:25:23 UTC
*** Bug 643733 has been marked as a duplicate of this bug. ***
Comment 7 Kai Willadsen 2013-03-26 20:27:21 UTC
*** Bug 696617 has been marked as a duplicate of this bug. ***
Comment 8 Kai Willadsen 2013-10-01 20:49:24 UTC
*** Bug 709193 has been marked as a duplicate of this bug. ***
Comment 9 GNOME Infrastructure Team 2017-12-13 18:47:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/meld/issues/9.