Replies: 13 comments
-
Line filters don't work for certain files only? Or do line filters not work on all files? Note: The confusing thing about WinMerge's line filters is that they are applied on a per-Diff block basis. |
Beta Was this translation helpful? Give feedback.
-
They didn't work on *.cpp, *.h, *.c, *.cc files for me yesterday. No matter how many times I would disable and enable them, WinMerge was showing to me ALL differences and I had to search for my comments with text Find function. I tried to test this again right now. Started the same search with line filter enabled, and it works correctly. However now, when I DISABLE the line filter and apply it, press F5 to refresh - it still shows ONLY the files and differences where my comment is... Go figure... I disabled both "Enable Line Filters" option and the (only) line filter I have, reloaded - no change, still the line filter is applied. Let me see what happens if I exit and restart WinMerge... No, now it stubbornly shows me ONLY the differences with my comment. Now I DELETED my line filter completely - no change. I completely don't understand what is happening here. Greg |
Beta Was this translation helpful? Give feedback.
-
If the "Ignore comment differences" option or the "IgnoreCommentsC" prediffer plugin is enabled, then the lines are being ignored by them, not by the line filter. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your comment. The only Ignore option that I enabled is "Ignore white space", the rest are disabled. I opened WinMerge right now and double checked - the line filters are working today too, and as yesterday, CANNOT be disabled. Or rather disabling them makes not difference at all. Maybe I'll try to fully uninstall WinMerge, then install again to see if that will clear the problem... |
Beta Was this translation helpful? Give feedback.
-
Uninstalled completely WinMerge. Also used RegEdit to delete all entries with WinMerge. Deleted manually the WinMerge folder under "C:\Program Files x86". Rebooted the computer just in case. Downloaded the 64-bit of the latest stable WinMerge and installed. This time my line filter is again ignored completely, and WinMerge shows ALL differences, regardless of the line filter setting... The only Ignore option that I enabled is again "Ignore blank lines", but disabling it also makes NO difference. Line filters are simply broken in the current stable release of WinMerge. Greg |
Beta Was this translation helpful? Give feedback.
-
Could you please create some text files to reproduce this problem? |
Beta Was this translation helpful? Give feedback.
-
Since the C/C++ library I'm dealing with is open source (licensed under GPL, but I also buy a commercial license to use it in my product), I created a ZIP file with both the older version of the library that includes my small modifications, marked with // GKochaniak comment, and the newer version. The zip file also contains screenshots of my settings. You may download this ZIP file (size about 2.4 MB) from my web site: https://hyperionics.com/downloads/pvt/WinMergeProblemDemo.zip As you may see on the snaps, I'm opening the older version with my mods from the folder XpdfSrc-4.03.05-GKochaniak in the left panel, and the newer version from the folder XpdfSrc-4.04 in the right panel. The line filter for GKochaniak comment is enabled. Only about 5 or 6 files should be showing as "modified" with the line filter enabled, but WinMerge is showing all changes no matter what I do. Or at other times, it shows only the changes with my mod comment, and won't show all the changes when I disable the line filter. Please let me know when you downloaded this file, I will then remove it from the server. Also let me know if you were able to reproduce the problem. Greg |
Beta Was this translation helpful? Give feedback.
-
Thank you for making the example. In my environment, line 343 of XpdfSrc-4.03.05-GKochaniak\xpdf\PDFDoc.cc is colored to indicate that the line is ignored when the line filter is enabled as follows. Is it dark yellow in your environment? [REMOVED] Do you expect lines to be ignored in a Diff block like the following? [REMOVED] |
Beta Was this translation helpful? Give feedback.
-
I want to changes NOT marked with // GKochaniak comment to be completely hidden, and the files that don't have such changes, hidden in the directory tree view. And when I disable line filters and repeat the search for changes, I want ALL the changes shown as usual. It used to work like this in older versions. Now turning line filters on or off makes no difference whatsoever. BUT WAIT... It seems to me now (with the lighter highlight you noticed) that my line filters are now working to EXCLUDE lines from comparison? And I want them to INCLUDE such lines only in the comparison. So I basically should create my line filter as a negation of what I have now? To FILTER OUT differences that don't contain my // GKochaniak comment? OK, I changed my line filter to: ^((?!GKochaniak).)*$ basically, to FILTER OUT the lines that do not contain // GKochaniak comment. Now it does exactly what I wanted, and turning the filter off and on again also works correctly. I'm sorry for all the confusion, this ticket may be now closed. And a BIG THANK YOU for your help! Greg |
Beta Was this translation helpful? Give feedback.
-
Sorry. I was misunderstanding. |
Beta Was this translation helpful? Give feedback.
-
No, it was I who was mistaken. All the settings I had saved in the old WinMerge years ago were forgotten with the switch to a new computer, and I forgot how these filters worked. Your comments helped me to understand and remember, so I am very grateful for your help. Greg |
Beta Was this translation helpful? Give feedback.
-
When Takashi apologized for misunderstanding, I figured I must have mistaken because I thought Greg was mistaken. LOL. :) I'm glad it all got figured out, and I learned quite a bit from reading this discussion. I've created a collection of WinMerge issue reports and discussions that contain useful details, and I've added this discussion to that collection. 👍🏾 |
Beta Was this translation helpful? Give feedback.
-
Great! Now my stupidity will be available to all to admire! :) Greg |
Beta Was this translation helpful? Give feedback.
-
I have a specific string in C/C++ sources comment to mark my changes to a code licensed from an outside source. When an update to that code library comes, I always use WinMerge with line filters enabled to search only for changes including this comment. Now no matter what I do, WinMerge shows me ALL the changes and ignores completely my line filter.
Comparing comments is NOT disabled in the filter settings. The version of WinMerge, updated today from your web site is 2.16.20.0.
Beta Was this translation helpful? Give feedback.
All reactions