mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
Remember "Bookmark Line" and "Purge" options in Mark dlg through the session
Fix #13277, close #13443
This commit is contained in:
parent
a67a5f7170
commit
b54b9c49ce
@ -2701,6 +2701,14 @@ void NppParameters::feedFindHistoryParameters(TiXmlNode *node)
|
|||||||
boolStr = (findHistoryRoot->ToElement())->Attribute(TEXT("regexBackward4PowerUser"));
|
boolStr = (findHistoryRoot->ToElement())->Attribute(TEXT("regexBackward4PowerUser"));
|
||||||
if (boolStr)
|
if (boolStr)
|
||||||
_findHistory._regexBackward4PowerUser = (lstrcmp(TEXT("yes"), boolStr) == 0);
|
_findHistory._regexBackward4PowerUser = (lstrcmp(TEXT("yes"), boolStr) == 0);
|
||||||
|
|
||||||
|
boolStr = (findHistoryRoot->ToElement())->Attribute(TEXT("bookmarkLine"));
|
||||||
|
if (boolStr)
|
||||||
|
_findHistory._isBookmarkLine = (lstrcmp(TEXT("yes"), boolStr) == 0);
|
||||||
|
|
||||||
|
boolStr = (findHistoryRoot->ToElement())->Attribute(TEXT("purge"));
|
||||||
|
if (boolStr)
|
||||||
|
_findHistory._isPurge = (lstrcmp(TEXT("yes"), boolStr) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NppParameters::feedShortcut(TiXmlNode *node)
|
void NppParameters::feedShortcut(TiXmlNode *node)
|
||||||
@ -7352,6 +7360,9 @@ bool NppParameters::writeFindHistory()
|
|||||||
(findHistoryRoot->ToElement())->SetAttribute(TEXT("isSearch2ButtonsMode"), _findHistory._isSearch2ButtonsMode?TEXT("yes"):TEXT("no"));
|
(findHistoryRoot->ToElement())->SetAttribute(TEXT("isSearch2ButtonsMode"), _findHistory._isSearch2ButtonsMode?TEXT("yes"):TEXT("no"));
|
||||||
(findHistoryRoot->ToElement())->SetAttribute(TEXT("regexBackward4PowerUser"), _findHistory._regexBackward4PowerUser ? TEXT("yes") : TEXT("no"));
|
(findHistoryRoot->ToElement())->SetAttribute(TEXT("regexBackward4PowerUser"), _findHistory._regexBackward4PowerUser ? TEXT("yes") : TEXT("no"));
|
||||||
|
|
||||||
|
(findHistoryRoot->ToElement())->SetAttribute(TEXT("bookmarkLine"), _findHistory._isBookmarkLine ? TEXT("yes") : TEXT("no"));
|
||||||
|
(findHistoryRoot->ToElement())->SetAttribute(TEXT("purge"), _findHistory._isPurge ? TEXT("yes") : TEXT("no"));
|
||||||
|
|
||||||
TiXmlElement hist_element{TEXT("")};
|
TiXmlElement hist_element{TEXT("")};
|
||||||
|
|
||||||
hist_element.SetValue(TEXT("Path"));
|
hist_element.SetValue(TEXT("Path"));
|
||||||
|
@ -1205,6 +1205,9 @@ struct FindHistory final
|
|||||||
bool _isFilterFollowDoc = false;
|
bool _isFilterFollowDoc = false;
|
||||||
bool _isFolderFollowDoc = false;
|
bool _isFolderFollowDoc = false;
|
||||||
|
|
||||||
|
bool _isBookmarkLine = false;
|
||||||
|
bool _isPurge = false;
|
||||||
|
|
||||||
// Allow regExpr backward search: this option is not present in UI, only to modify in config.xml
|
// Allow regExpr backward search: this option is not present in UI, only to modify in config.xml
|
||||||
bool _regexBackward4PowerUser = false;
|
bool _regexBackward4PowerUser = false;
|
||||||
};
|
};
|
||||||
|
@ -386,6 +386,9 @@ void FindReplaceDlg::fillFindHistory()
|
|||||||
::SendDlgItemMessage(_hSelf, IDREGEXP, BM_SETCHECK, findHistory._searchMode == FindHistory::regExpr, 0);
|
::SendDlgItemMessage(_hSelf, IDREGEXP, BM_SETCHECK, findHistory._searchMode == FindHistory::regExpr, 0);
|
||||||
::SendDlgItemMessage(_hSelf, IDREDOTMATCHNL, BM_SETCHECK, findHistory._dotMatchesNewline, 0);
|
::SendDlgItemMessage(_hSelf, IDREDOTMATCHNL, BM_SETCHECK, findHistory._dotMatchesNewline, 0);
|
||||||
|
|
||||||
|
::SendDlgItemMessage(_hSelf, IDC_MARKLINE_CHECK, BM_SETCHECK, findHistory._isBookmarkLine, 0);
|
||||||
|
::SendDlgItemMessage(_hSelf, IDC_PURGE_CHECK, BM_SETCHECK, findHistory._isPurge, 0);
|
||||||
|
|
||||||
::SendDlgItemMessage(_hSelf, IDC_2_BUTTONS_MODE, BM_SETCHECK, findHistory._isSearch2ButtonsMode, 0);
|
::SendDlgItemMessage(_hSelf, IDC_2_BUTTONS_MODE, BM_SETCHECK, findHistory._isSearch2ButtonsMode, 0);
|
||||||
|
|
||||||
if (findHistory._searchMode == FindHistory::regExpr)
|
if (findHistory._searchMode == FindHistory::regExpr)
|
||||||
@ -2171,14 +2174,14 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
|||||||
case IDC_PURGE_CHECK :
|
case IDC_PURGE_CHECK :
|
||||||
{
|
{
|
||||||
if (_currentStatus == MARK_DLG)
|
if (_currentStatus == MARK_DLG)
|
||||||
_options._doPurge = isCheckedOrNot(IDC_PURGE_CHECK);
|
findHistory._isPurge = _options._doPurge = isCheckedOrNot(IDC_PURGE_CHECK);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case IDC_MARKLINE_CHECK :
|
case IDC_MARKLINE_CHECK :
|
||||||
{
|
{
|
||||||
if (_currentStatus == MARK_DLG)
|
if (_currentStatus == MARK_DLG)
|
||||||
_options._doMarkLine = isCheckedOrNot(IDC_MARKLINE_CHECK);
|
findHistory._isBookmarkLine = _options._doMarkLine = isCheckedOrNot(IDC_MARKLINE_CHECK);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user