GNOME Bugzilla – Bug 384767
Text filters should handle regexes that change multiple lines
Last modified: 2017-12-13 18:47:09 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:
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.
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.
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.
The earlier discussion on this seems to be bug 159795.
Retitling and updating this bug. Unfortunately, this is still quite hard to fix given the way that Meld's incremental updating of diffs works.
*** Bug 643733 has been marked as a duplicate of this bug. ***
*** Bug 696617 has been marked as a duplicate of this bug. ***
*** Bug 709193 has been marked as a duplicate of this bug. ***
-- 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.