diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml
index 27d58e51b..078c5e684 100644
--- a/PowerEditor/installer/nativeLang/english.xml
+++ b/PowerEditor/installer/nativeLang/english.xml
@@ -847,6 +847,7 @@ You can define several column markers by using white space to separate the diffe
+
diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp
index 3c7a65a53..6d146a99c 100644
--- a/PowerEditor/src/Notepad_plus.cpp
+++ b/PowerEditor/src/Notepad_plus.cpp
@@ -1804,9 +1804,16 @@ bool Notepad_plus::findInFiles()
_findReplaceDlg.putFindResult(nbTotal);
- FindHistory & findHistory = (NppParameters::getInstance()).getFindHistory();
- if (nbTotal && !findHistory._isDlgAlwaysVisible)
- _findReplaceDlg.display(false);
+ if (nbTotal != 0)
+ {
+ const NppParameters& nppParam = NppParameters::getInstance();
+ const NppGUI& nppGui = nppParam.getNppGUI();
+ if (!nppGui._findDlgAlwaysVisible)
+ {
+ _findReplaceDlg.display(false);
+ }
+ }
+
return true;
}
@@ -1866,9 +1873,16 @@ bool Notepad_plus::findInOpenedFiles()
_findReplaceDlg.putFindResult(nbTotal);
- FindHistory & findHistory = (NppParameters::getInstance()).getFindHistory();
- if (nbTotal && !findHistory._isDlgAlwaysVisible)
- _findReplaceDlg.display(false);
+ if (nbTotal != 0)
+ {
+ const NppParameters& nppParam = NppParameters::getInstance();
+ const NppGUI& nppGui = nppParam.getNppGUI();
+ if (!nppGui._findDlgAlwaysVisible)
+ {
+ _findReplaceDlg.display(false);
+ }
+ }
+
return true;
}
@@ -1916,9 +1930,16 @@ bool Notepad_plus::findInCurrentFile(bool isEntireDoc)
_findReplaceDlg.putFindResult(nbTotal);
- FindHistory & findHistory = (NppParameters::getInstance()).getFindHistory();
- if (nbTotal && !findHistory._isDlgAlwaysVisible)
- _findReplaceDlg.display(false);
+ if (nbTotal != 0)
+ {
+ const NppParameters& nppParam = NppParameters::getInstance();
+ const NppGUI& nppGui = nppParam.getNppGUI();
+ if (!nppGui._findDlgAlwaysVisible)
+ {
+ _findReplaceDlg.display(false);
+ }
+ }
+
return true;
}
diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp
index 563c188dd..4ec6ca8ee 100644
--- a/PowerEditor/src/Parameters.cpp
+++ b/PowerEditor/src/Parameters.cpp
@@ -2343,10 +2343,6 @@ void NppParameters::feedFindHistoryParameters(TiXmlNode *node)
if (boolStr)
_findHistory._isFifInHiddenFolder = (lstrcmp(TEXT("yes"), boolStr) == 0);
- boolStr = (findHistoryRoot->ToElement())->Attribute(TEXT("dlgAlwaysVisible"));
- if (boolStr)
- _findHistory._isDlgAlwaysVisible = (lstrcmp(TEXT("yes"), boolStr) == 0);
-
boolStr = (findHistoryRoot->ToElement())->Attribute(TEXT("fifFilterFollowsDoc"));
if (boolStr)
_findHistory._isFilterFollowDoc = (lstrcmp(TEXT("yes"), boolStr) == 0);
@@ -5137,6 +5133,10 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
const TCHAR* optStopFillingFindField = element->Attribute(TEXT("stopFillingFindField"));
if (optStopFillingFindField)
_nppGUI._stopFillingFindField = (lstrcmp(optStopFillingFindField, TEXT("yes")) == 0);
+
+ const TCHAR* optFindDlgAlwaysVisible = element->Attribute(TEXT("findDlgAlwaysVisible"));
+ if (optFindDlgAlwaysVisible)
+ _nppGUI._findDlgAlwaysVisible = (lstrcmp(optFindDlgAlwaysVisible, TEXT("yes")) == 0);
}
else if (!lstrcmp(nm, TEXT("MISC")))
{
@@ -5943,13 +5943,14 @@ void NppParameters::createXmlTreeFromGUIParams()
GUIConfigElement->SetAttribute(TEXT("docPeekOnMap"), _nppGUI._isDocPeekOnMap ? TEXT("yes") : TEXT("no"));
}
- //
+ //
{
TiXmlElement* GUIConfigElement = (newGUIRoot->InsertEndChild(TiXmlElement(TEXT("GUIConfig"))))->ToElement();
GUIConfigElement->SetAttribute(TEXT("name"), TEXT("Searching"));
GUIConfigElement->SetAttribute(TEXT("monospacedFontFindDlg"), _nppGUI._monospacedFontFindDlg ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("stopFillingFindField"), _nppGUI._stopFillingFindField ? TEXT("yes") : TEXT("no"));
+ GUIConfigElement->SetAttribute(TEXT("findDlgAlwaysVisible"), _nppGUI._findDlgAlwaysVisible ? TEXT("yes") : TEXT("no"));
}
//
@@ -6015,7 +6016,6 @@ bool NppParameters::writeFindHistory()
(findHistoryRoot->ToElement())->SetAttribute(TEXT("fifRecuisive"), _findHistory._isFifRecuisive?TEXT("yes"):TEXT("no"));
(findHistoryRoot->ToElement())->SetAttribute(TEXT("fifInHiddenFolder"), _findHistory._isFifInHiddenFolder?TEXT("yes"):TEXT("no"));
- (findHistoryRoot->ToElement())->SetAttribute(TEXT("dlgAlwaysVisible"), _findHistory._isDlgAlwaysVisible?TEXT("yes"):TEXT("no"));
(findHistoryRoot->ToElement())->SetAttribute(TEXT("fifFilterFollowsDoc"), _findHistory._isFilterFollowDoc?TEXT("yes"):TEXT("no"));
(findHistoryRoot->ToElement())->SetAttribute(TEXT("fifFolderFollowsDoc"), _findHistory._isFolderFollowDoc?TEXT("yes"):TEXT("no"));
diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h
index 67a043426..3fbfa0666 100644
--- a/PowerEditor/src/Parameters.h
+++ b/PowerEditor/src/Parameters.h
@@ -836,6 +836,7 @@ struct NppGUI final
bool _backSlashIsEscapeCharacterForSql = true;
bool _stopFillingFindField = false;
bool _monospacedFontFindDlg = false;
+ bool _findDlgAlwaysVisible = false;
writeTechnologyEngine _writeTechnologyEngine = defaultTechnology;
bool _isWordCharDefault = true;
std::string _customWordChars;
@@ -1171,7 +1172,6 @@ struct FindHistory final
transparencyMode _transparencyMode = onLossingFocus;
int _transparency = 150;
- bool _isDlgAlwaysVisible = false;
bool _isFilterFollowDoc = false;
bool _isFolderFollowDoc = false;
diff --git a/PowerEditor/src/WinControls/Preference/preference.rc b/PowerEditor/src/WinControls/Preference/preference.rc
index ec5a2b87d..107b9847e 100644
--- a/PowerEditor/src/WinControls/Preference/preference.rc
+++ b/PowerEditor/src/WinControls/Preference/preference.rc
@@ -145,8 +145,9 @@ IDD_PREFERENCE_SEARCHINGSETTINGS_BOX DIALOGEX 0, 0, 455, 185
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CONTROL "Don't fill find field in Find dialog with selected word", IDC_CHECK_STOPFILLINGFINDFIELD, "Button", BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,37,10,350,10
+ CONTROL "Don't fill find field in Find dialog with selected word", IDC_CHECK_STOPFILLINGFINDFIELD, "Button", BS_AUTOCHECKBOX | WS_TABSTOP,37,10,350,10
CONTROL "Use Monospaced font in Find dialog (Need to restart Notepad++)",IDC_CHECK_MONOSPACEDFONT_FINDDLG, "Button", BS_AUTOCHECKBOX | WS_TABSTOP,37,25,350,10
+ CONTROL "Find dialog remains open after search that outputs to results window",IDC_CHECK_FINDDLG_ALWAYS_VISIBLE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP,37,40,350,10
END
IDD_PREFERENCE_NEWDOCSETTING_BOX DIALOGEX 0, 0, 455, 185
diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
index 3c42898a2..e2d46d364 100644
--- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
+++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
@@ -3516,6 +3516,7 @@ INT_PTR CALLBACK SearchingSettingsDlg::run_dlgProc(UINT message, WPARAM wParam,
{
::SendDlgItemMessage(_hSelf, IDC_CHECK_STOPFILLINGFINDFIELD, BM_SETCHECK, nppGUI._stopFillingFindField, 0);
::SendDlgItemMessage(_hSelf, IDC_CHECK_MONOSPACEDFONT_FINDDLG, BM_SETCHECK, nppGUI._monospacedFontFindDlg, 0);
+ ::SendDlgItemMessage(_hSelf, IDC_CHECK_FINDDLG_ALWAYS_VISIBLE, BM_SETCHECK, nppGUI._findDlgAlwaysVisible, 0);
}
break;
@@ -3537,6 +3538,13 @@ INT_PTR CALLBACK SearchingSettingsDlg::run_dlgProc(UINT message, WPARAM wParam,
}
break;
+ case IDC_CHECK_FINDDLG_ALWAYS_VISIBLE:
+ {
+ nppGUI._findDlgAlwaysVisible = isCheckedOrNot(IDC_CHECK_FINDDLG_ALWAYS_VISIBLE);
+ return TRUE;
+ }
+ break;
+
default:
return FALSE;
}
diff --git a/PowerEditor/src/WinControls/Preference/preference_rc.h b/PowerEditor/src/WinControls/Preference/preference_rc.h
index 4cee9e454..741c61c3c 100644
--- a/PowerEditor/src/WinControls/Preference/preference_rc.h
+++ b/PowerEditor/src/WinControls/Preference/preference_rc.h
@@ -358,5 +358,6 @@
#define IDD_PREFERENCE_SEARCHINGSETTINGS_BOX 6900 //(IDD_PREFERENCE_BOX + 900)
#define IDC_CHECK_STOPFILLINGFINDFIELD (IDD_PREFERENCE_SEARCHINGSETTINGS_BOX + 1)
#define IDC_CHECK_MONOSPACEDFONT_FINDDLG (IDD_PREFERENCE_SEARCHINGSETTINGS_BOX + 2)
+ #define IDC_CHECK_FINDDLG_ALWAYS_VISIBLE (IDD_PREFERENCE_SEARCHINGSETTINGS_BOX + 3)
#endif //PREFERENCE_RC_H