Fix "clear all marks in find dialog also removes bookmarks" issue

Fix partially "clear all marks in find dialog also removes bookmarks" issue:
* Bookmark line unticked: Clear all marks button press clears only all redmarking
* Bookmark line ticked: Clear all marks button press clears all redmarking and all bookmarks

Fix #3546, close #6042
This commit is contained in:
Scott Sumner 2019-08-12 10:53:13 -04:00 committed by Don HO
parent 93a9962fde
commit f6d6e42ac1
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -1359,7 +1359,10 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
{
if (isMacroRecording) saveInMacro(wParam, FR_OP_FIND);
(*_ppEditView)->clearIndicator(SCE_UNIVERSAL_FOUND_STYLE);
(*_ppEditView)->execute(SCI_MARKERDELETEALL, MARK_BOOKMARK);
if (_options._doMarkLine)
{
(*_ppEditView)->execute(SCI_MARKERDELETEALL, MARK_BOOKMARK);
}
setStatusbarMessage(TEXT(""), FSNoMessage);
}
}
@ -2562,7 +2565,7 @@ void FindReplaceDlg::saveInMacro(size_t cmd, int cmdType)
}
if (cmd == IDC_CLEAR_ALL)
{
booleans = 0;
booleans = _options._doMarkLine ? IDF_MARKLINE_CHECK : 0;
}
::SendMessage(_hParent, WM_FRSAVE_INT, IDC_FRCOMMAND_BOOLEANS, booleans);
::SendMessage(_hParent, WM_FRSAVE_INT, IDC_FRCOMMAND_EXEC, cmd);
@ -2796,7 +2799,11 @@ void FindReplaceDlg::execSavedCommand(int cmd, uptr_t intValue, const generic_st
case IDC_CLEAR_ALL:
{
(*_ppEditView)->clearIndicator(SCE_UNIVERSAL_FOUND_STYLE);
(*_ppEditView)->execute(SCI_MARKERDELETEALL, MARK_BOOKMARK);
if (_env->_doMarkLine)
{
(*_ppEditView)->execute(SCI_MARKERDELETEALL, MARK_BOOKMARK);
}
setStatusbarMessage(TEXT(""), FSNoMessage);
break;
}