Hi,
This patch adds progress tracking during FindInFiles and ReplaceInFiles operations. It shows progress bar window with cancel button instead of the cancel MessageBox that pops-up now.
This also removes the potential problems that may arise from terminating the cancel MessageBox thread mentioned above. My experience is that Notepad++ sometimes crashes during FindInFiles and ReplaceInFiles operations. I'm not absolutely sure but I think the thread termination might be causing the crash. If I'm right then the patch fixes this issue as well.
My Notepad++ is configured to automatically remove all trailing white spaces on file save so the patch includes a bunch of line changes that are simply white space removals. Sorry if that causes confusion.
Please use FindInFilesProgress_v2.patch attached with this post instead of FindInFilesProgress.patch. I removed one unnecessary message handling from the window procedure.
Hello Pavel,
very nice feature. Thank you.
About your "remove all trailing white spaces" added in your patch, I have
another solution for you :
function
Here is my macro (shortcuts.xml) :
<macro name="Trim Trailing and save" ctrl="yes" alt="no" shift="no" key="83">
<action type="2" message="0" wparam="42024" lparam="0" sparam="">
<action type="2" message="0" wparam="41006" lparam="0" sparam="">
</action></action></macro>
Christophe
2014-11-11 10:33 GMT+01:00 Pavel Nedev pnedev@users.sf.net:
Related
Patches:
#627Hello again,
after looking your patch, I figure out my mistake. I though you add code to
modify the function "save" to add a trim trailing space.
I didn't understood you removed the trailing space in the C++ code.
My opinion is you were right to clean file. Maybe we should make a total
cleaning of every file.
Christophe
2014-11-14 10:56 GMT+01:00 Christophe Meriaux christophe.meriaux@gmail.com
:
Related
Patches:
#627Hi Christophe, I'm glad you like it.
Perhaps I should make the Progress window top-most always so the user cannot hide it or at least create it with WS_EX_TOOLWINDOW style to hide it from task bar and Alt-Tab switcher.
Unfortunately I cannot check these changes right now because I'm working under Linux and I don't have a way to compile N++ at the moment.
You can find attached the untested FindInFilesProgress_v3.patch.
It also uses global scoping for the system API functions to be consistent with N++ code style.
I'll test the new version tonight.
Hi again,
You can find the tested version 3 of the patch in the post below.
I have deleted the untested attachment from here.
This is the last tested update of the patch: FindInFilesProgress_v3.patch
As I wrote to Christophe, I have made Win32 API function calls globally scoped (to be consistent with N++ code style) + the Progress window now has the WS_EX_TOOLWINDOW + WS_EX_TOPMOST styles to hide it from task-bar and Alt-Tab switcher while active and keep it always on top of other windows. It is also re-based to the latest SVN revision.
Hy Pavel,
I compiled your patch and tried it. I applied your patch on revision 1288
Your feature is awesome. I Hope Don will integrate it.
Christophe
Thanks Christophe.
The "remove all trailing white spaces" makes patch review impossible.
Is it possible to do without this part?
Don
Last edit: Don HO 2014-11-26
Sure.
Here is patch version 4:
1) No trailing white-space removals.
2) re-based on latest SVN revision.
BR,
Pavel
Thank you Pavel for the v4 patch.
I integrated your patch and compiled Notepad++ with VS2013. The binary crashed under Win 8.1 64 bits and 32 bits machines (in the end of search). Of course, the binary without integration of this patch doesn't crash with the same condition.
Please see the attached files to reproduce the crash.
You can download the compiled binary here:
http://notepad-plus-plus.org/tmp/notepad++_newFindProgressDialog.7z
Don
Last edit: Don HO 2014-11-28
Hi Don,
I do not have Win 8.1 machine so I cannot test on Win 8.1.
I tested your binary on XP (Wine on Linux actually - XP mode) and it also
crashed as you said.
I'll take a look.
Meanwhile, can you test with the attached binary and write back if it works
ok?
I've compiled it with VS2012 on Win 7 64bit, N++ src rev.1296.
I have renamed the attached zip from notepad++.7z to notepad++.arch to be
able to pass gmail attachment filters.
Rename it back once downloaded.
Thanks,
Pavel
On Fri, Nov 28, 2014 at 3:08 AM, Don HO donho@users.sf.net wrote:
Related
Patches:
#627Hi Pavel,
Tested notepad++.arch, it doesn't crash anymore.
I guess it OK to go. Could you provide your new patch then?
Thank you for your quick fix.
Don
Hi Don,
That's strange. I haven't changed anything in the code.
Just tried compiling N++ in Unicode Debug configuration and the binary crashed as you observed. Compiling Unicode Release configuration works fine (notepad++.arch was build in release mode).
I have no idea what's the reason yet, need to investigate further.
Can you try building N++ in Unicode Release and test if it is OK?
BR,
Pavel
Pavel,
I built the binary (with your patch) in Unicode Release mode. There's no crash.
But I cannot integrate your patch since there's some crash issues in debug mode (it crash even when I click on Cancel button).
Don
Last edit: Don HO 2014-11-30
I know Don, I'll look into that, thanks.
Pavel
Hi Pavel/Don,
When I used notepad++.arch, found strange behavior of Compare plugin.
After clicking on "Plugins->Compare->Compare (Alt+D)", file matches with itself and hence showing "Files Match" dialogue.
Hi,
This doesn't seem related to this patch as it only changes the dialog shown on FindInFiles and ReplaceInFiles operations. However notepad++.arch was built on re-based N++ source code (unpublished yet) so it might have something to do with this issue.
Can you try N++ RC 6.7 version (announced by Don couple of days ago - look on the Discussion forum) and check if the issue is there?
Write back the result.
I tried N++ RC 6.7 and found that issue is in Release Candidate 6.7 version.
This has nothing to do with your patch.
Thanks for your patch.
I'm going to post this issue in appropriate forum.
Hi Don,
Here is v5 of the patch. It is working in both Debug and Release mode. Rebased on latest SVN commit. Sorry for the late update.
Pavel
Please use this final patch-set (v6 attached).
I have used GetWindowLongPtr() everywhere instead of GetWindowLong(). This doesn't change anything functionally if the binary is 32-bit but is recommended if in the future 64-bit is considered.
Thank you Pavel.
There's no crash anymore with your latest patch.
I added some enhancement as well.
Committed in rev. 1345.
Thank you for your contribution.
Don
Thank you for Notepad++, Don.
Your enhancement is great but it will show the current file only when the percent is increased. Now because the percent is increased by minimum 1% if there are many files in the search then 1% may contain several files. Now only the last will be shown.
The patch with this post will update the info you added on every file searched.
Pavel