Jean Sebastien Leroy, Compare Plugin's creator, abandoned the project a long time ago.
UFO has fixed some bugs and added many improvements.
Unfortunately, he has probably quit as well. We miss you UFO. :)
UFO’s v220.127.116.11 has not been completed.
In some cases this version throws an exception and crashes.
(Uncheck “Ignore Spacing” and compare the files in Test.zip).
#define VARRAY_INIT_SIZE 16
(in varray.h) seems to solve the problem.
I’ve also made the following changes:
- Remove the Progress Bar introduced in v18.104.22.168.
- Some minor improvements in comparing with Wrap mode on.
- Fix the shortcuts for Next, Prev, etc…
- An option to close the compared files if they match.
I’ve made a version with new images for the Compare margin.
The background is set to my “Line Number Margin” background color: RGB 228 228 228.
If anyone knows how to change the XPM images background to transparent, I’d appreciate it.
(The relevant files are: icon_add_16.h, icon_moved_16.h, icon_sub_16.h and icon_warning_16.h).
** The menu items and toolbar buttons are never disabled in this version.
I’m sure many users would appreciate an experienced developer willing to continue the work on this useful plugin.
First of all, I wish you, your family and friends, an excellent year 2016. I would like to say "better than 2015". Unfortunately, the recent events, all over the world, contradict my talk !
Many thanks for proposing, both, your modified 22.214.171.124 version of UFO and your second version, with the new icons for the lines added, removed, changed or moved !
After testing these both versions, some points ( without any order ):
I agree that the Progress bar dialog feature should be of few interest, because it’s must be very difficult to estimate the real remaining time ! In addition, this adding may, likely, slow down the overall compare process !
Indeed, your new shortcuts are more appropriate ( no collision with the Next Tab and Previous Tab shortcuts )
In the version 126.96.36.199, the zoom levels, of the two N++ views, are synchronized, when comparing. It’s a nice improvement ! Unfortunately, this feature does NOT work, in your last version, with new images :-((
Your new option for closing the two compared files when they are strictly identical is an interesting feature, too :-)) However, when this new dialog appears : Files match. Close compared files?
The ESC key does NOT close the dialog, with the implicit No answer, as well as a left mouse click on the close button :-(
I’m wondering if the NO button should be, rather, the default one ?. If you consider this modification ( No obligation at all, of course ! ), there are two solutions to reverse the logic of that dialog :
Change the text of the dialog, as Files match. Keep compared files[ opened]? ( and the appropriate code, too ! )
Select the NO button as the default one, like, for instance, the Are you sure? dialog, when you click on the Replace in Files button of the Find in Files window
Thanks for the wishes. You are a kind gentleman.
A good and happy year for you and your loved ones.
And, indeed, a better year for the world in general and France in particular.
Special thanks for testing and for your intelligent comments. The sharpest eye around. :)
The Progress Bar might be a good idea for large files.
UFO and Pavel had a difficult time making it work properly. They are the experts; I didn’t even try.
Actually, a “Busy” cursor could be a good solution too.
I intentionally removed the Zoom Sync in the version I use personally.
Re-added in the attached file.
I often compare a good few sets of files, and if they match I want to close them.
But you’re right: it might not be everyone’s preferred behavior.
I’ve rebuilt it with “No” as the default button.
As for the ESC key:
If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect.
- The Close button is disabled in a MB_YESNO message box.
I’m not sure I understand what you mean by “with the implicit No answer”. :)
Many thanks for creating these modified releases, so quickly :-))
They both work, as expected, with the zoom synchronization and the default No button, when a complete match occurs.
BTW, when I said, in my previous post,
I just pointed out that, IF a Cancel button is available, in a dialog box, hitting the ESC key or mouse clicking on the red cross icon, in the top right corner of the dialog, is strictly equivalent to mouse clicking on the No button !
I don’t ask for this new feature, but I’m wondering :
As you, seemingly, want to keep the zoom levels of your two N+ views, for your own needs, may be it would be possible to temporary store the current zoom level, of each view, in order :
To synchronize the zoom levels of the two views, during the compare process ( ALT + D )
To get back to these initial zoom levels, after a Clear Results command ( CTRL + ALT + D ) !
So, you wouldn’t have to build two versions of your plugin ! ( one with zoom synchronization, and the other without ). Of course, I don’t even know if that goal is technically possible to reach ?
If you regularly use Compare, I’m glad I’ve been able to slightly reciprocate to your kind and wise help to everyone on this forum. :)
Ede123 has referred me to jsleroy’s current repo.
If anything happens there, your contribution would be highly appreciated.
As for the Zoom Sync:
Thanks for the suggestion.
I never change the zoom level and therefore removed the relevant code in the version I use.
I forgot to mention another modification: a sound notification when wrapping around (i.e. if you reach the last diff and press Next - a beep will play in addition to the window flash).
I owe UFO an apology.
What I thought was an improvement in comparing with Wrap mode, is actually a regression (back to v188.8.131.52 behavior) in many cases.
(Compare the files in Test2.zip).
We shouldn’t use NPP vertical scroll sync but rather UFO’s “case SCN_UPDATEUI:”.
NPP enabling and disabling the Sync Scroll commands is somewhat inconsistent.
Therefore my changes relating to restoring the Sync Scroll state are too complex and not worth it.
Back to UFO’s Restore Sync Scroll.
Using your files found in Test.zip:
Compare 184.108.40.206 (UFO) and below - correct navbar https://i.imgur.com/JMybhaZ.png (well, more or less, as there are too many lines to fit in this small window anyway)
Compare 220.127.116.11 (UFO) and above (including your new builds) - incorrect https://i.imgur.com/nXJNG1N.png
I never use the NavBar and did not follow UFO’s relevant changes.
It’s possible that UFO decided to ignore one-line-blocks.
Could you open an issue here?
Jean Sebastien and/or Pavel might look into it.
Plugin good. But I would like to display the number of similar / different lines in figures or percentages.
I’d like to have this feature too.
Please see this issue.
I’ve installed notepad++ to compare .cs files but it doesn’t work.
1- open both files
then I saw “unknown exception” error.
I had compare troubles where the plugin was destroying returning to the previous explorer file listing (for instance) which i traced down to the compare plugin. After a hell of a lot of wasted time and tracking down I find that 18.104.22.168 does actually work for me in comparing as well as returning focus to the original program once Notepad++ has been closed. So I recommend 22.214.171.124. from [https://bitbucket.org/uph0/compare/downloads](link url).
Also a dose of Good luck. MInsik.
Hello Yaron, thanks for changes you made on plugin. I used old one until now and i have a lot of troubles with it.
You and UFO have made great job! :-)
I have one proposal for improvement. It will be nice to have a options to change color(or reverse alpha) of text in highlighted areas. I have the dark theme with light color text and when selected lines have bright background(default yellow or green) then the text fades in background.
Thanks. UFO deserves the flowers. :)
Pavel Nedev has been working on a new version. Yo can open an issue here.