From c51458558bcc42745237738bc4101febbadf31cf Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Sun, 26 May 2019 18:17:35 +0200 Subject: [PATCH] +fix: FocusView preserved on closing Find/Replacce dialog (add missing checks) --- Versions/build.txt | 2 +- res/Notepad3.exe.manifest.conf | 2 +- src/Edit.c | 7 ++++++- src/VersionEx.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Versions/build.txt b/Versions/build.txt index 921f45ad4..57bf58ca8 100644 --- a/Versions/build.txt +++ b/Versions/build.txt @@ -1 +1 @@ -1726 +1727 diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf index 66521d0c4..2d6824b78 100644 --- a/res/Notepad3.exe.manifest.conf +++ b/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ Notepad3 RC diff --git a/src/Edit.c b/src/Edit.c index 1cec89036..82e318496 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -5260,8 +5260,13 @@ static INT_PTR CALLBACK EditFindReplaceDlgProcW(HWND hwnd,UINT umsg,WPARAM wPara // check if we had to revert FocusedView if (FocusedView.HideNonMatchedLines) { if (!IsMarkOccurrencesEnabled() || + SciCall_IsSelectionEmpty() || Settings.MarkOccurrencesMatchVisible || - (Settings.MarkOccurrencesMatchWholeWords != IsButtonChecked(hwnd, IDC_FINDWORD))) + IsButtonChecked(hwnd, IDC_FINDSTART) || + IsButtonChecked(hwnd, IDC_FINDREGEXP) || + IsButtonChecked(hwnd, IDC_WILDCARDSEARCH) || + (Settings.MarkOccurrencesMatchWholeWords != IsButtonChecked(hwnd, IDC_FINDWORD)) || + (Settings.MarkOccurrencesMatchCase != IsButtonChecked(hwnd, IDC_FINDCASE))) { EditToggleView(sg_pefrData->hwnd); } diff --git a/src/VersionEx.h b/src/VersionEx.h index 51f0617cf..fac593428 100644 --- a/src/VersionEx.h +++ b/src/VersionEx.h @@ -8,7 +8,7 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 19 #define VERSION_REV 526 -#define VERSION_BUILD 1726 +#define VERSION_BUILD 1727 #define SCINTILLA_VER 415+ #define ONIGMO_REGEX_VER 6.2.0 #define VERSION_PATCH RC