Remove unneeded IDC_FINDPREV and IDC_FINDNEXT from macros

Fix #7928, close #7976
This commit is contained in:
Scott Sumner 2020-02-23 19:48:22 -05:00 committed by Don HO
parent 40b49d0b66
commit 521ff86665
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -1039,8 +1039,6 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
updateCombo(IDFINDWHAT);
nppParamInst._isFindReplacing = true;
if (isMacroRecording)
saveInMacro(wParam, FR_OP_FIND);
bool direction_bak = _options._whichDirection;
@ -1063,6 +1061,9 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
}
}
if (isMacroRecording)
saveInMacro(IDOK, FR_OP_FIND);
FindStatus findStatus = FSFound;
processFindNext(_options._str2Search.c_str(), _env, &findStatus);
// restore search direction which may have been overwritten because shift-key was pressed
@ -2665,24 +2666,6 @@ void FindReplaceDlg::execSavedCommand(int cmd, uptr_t intValue, const generic_st
nppParamInst._isFindReplacing = false;
break;
case IDC_FINDNEXT:
{
nppParamInst._isFindReplacing = true;
_options._whichDirection = DIR_DOWN;
processFindNext(_env->_str2Search.c_str());
nppParamInst._isFindReplacing = false;
}
break;
case IDC_FINDPREV:
{
nppParamInst._isFindReplacing = true;
_env->_whichDirection = DIR_UP;
processFindNext(_env->_str2Search.c_str());
nppParamInst._isFindReplacing = false;
}
break;
case IDREPLACE:
nppParamInst._isFindReplacing = true;
processReplace(_env->_str2Search.c_str(), _env->_str4Replace.c_str(), _env);