diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f2828873b..a4eced8fe 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1495,7 +1495,6 @@ bool Notepad_plus::replaceInFiles() { updateOnCount += filesPerPercent; progress.setPercent((i * 100) / filesCount, fileNames.at(i).c_str()); - progress.flushCallerUserInput(); } else { @@ -1504,7 +1503,6 @@ bool Notepad_plus::replaceInFiles() } progress.close(); - progress.flushCallerUserInput(); _invisibleEditView.execute(SCI_SETDOCPOINTER, 0, oldDoc); _invisibleEditView.setCurrentBuffer(oldBuf); @@ -1584,7 +1582,6 @@ bool Notepad_plus::findInFiles() { updateOnCount += filesPerPercent; progress.setPercent((i * 100) / filesCount, fileNames.at(i).c_str()); - progress.flushCallerUserInput(); } else { @@ -1593,7 +1590,6 @@ bool Notepad_plus::findInFiles() } progress.close(); - progress.flushCallerUserInput(); _findReplaceDlg.finishFilesSearch(nbTotal); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index d52c37adf..809c62cb6 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -3112,21 +3112,7 @@ void Progress::setPercent(unsigned percent, const TCHAR *fileName) const } -void Progress::flushCallerUserInput() const -{ - MSG msg; - for (HWND hwnd = _hCallerWnd; hwnd; hwnd = ::GetParent(hwnd)) - { - if (::PeekMessage(&msg, hwnd, 0, 0, PM_QS_INPUT | PM_REMOVE)) - { - while (::PeekMessage(&msg, hwnd, 0, 0, PM_QS_INPUT | PM_REMOVE)); - ::UpdateWindow(hwnd); - } - } -} - - -DWORD Progress::threadFunc(LPVOID data) +DWORD WINAPI Progress::threadFunc(LPVOID data) { Progress* pw = static_cast(data); return (DWORD)pw->thread(); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h index 788a22662..eb7f1ea8b 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h @@ -431,7 +431,6 @@ public: } void setPercent(unsigned percent, const TCHAR *fileName) const; - void flushCallerUserInput() const; private: static const TCHAR cClassName[];