Skip to content

Commit

Permalink
Revert "Suppress event notification during replace all to improve the…
Browse files Browse the repository at this point in the history
… speed."

This reverts commit ce3763a.
  • Loading branch information
zufuliu committed Nov 16, 2023
1 parent ce3763a commit 4eae641
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -5842,7 +5842,6 @@ bool EditReplaceAll(HWND hwnd, LPCEDITFINDREPLACE lpefr, bool bShowInfo) {
// Show wait cursor...
BeginWaitCursor();
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
SciCall_SetModEventMask(SC_MOD_NONE);
#if 0
StopWatch watch;
StopWatch_Start(watch);
Expand Down Expand Up @@ -5889,7 +5888,6 @@ bool EditReplaceAll(HWND hwnd, LPCEDITFINDREPLACE lpefr, bool bShowInfo) {
StopWatch_Stop(watch);
StopWatch_ShowLog(&watch, "EditReplaceAll() time");
#endif
SciCall_SetModEventMask(SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
if (iCount) {
EditEnsureSelectionVisible();
Expand Down Expand Up @@ -5929,7 +5927,6 @@ bool EditReplaceAllInSelection(HWND hwnd, LPCEDITFINDREPLACE lpefr, bool bShowIn
// Show wait cursor...
BeginWaitCursor();
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
SciCall_SetModEventMask(SC_MOD_NONE);

const bool bRegexStartOfLine = bReplaceRE && (szFind2[0] == '^');
struct Sci_TextToFindFull ttf = { { SciCall_GetSelectionStart(), SciCall_GetLength() }, szFind2, { 0, 0 } };
Expand Down Expand Up @@ -5972,7 +5969,6 @@ bool EditReplaceAllInSelection(HWND hwnd, LPCEDITFINDREPLACE lpefr, bool bShowIn
}
}

SciCall_SetModEventMask(SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
if (iCount) {
const Sci_Position iPos = SciCall_GetTargetEnd();
Expand Down

0 comments on commit 4eae641

Please sign in to comment.