Skip to content

Commit

Permalink
Remove unneeded IDC_FINDPREV and IDC_FINDNEXT from macros
Browse files Browse the repository at this point in the history
Fix #7928, close #7976
  • Loading branch information
sasumner authored and donho committed Feb 26, 2020
1 parent 40b49d0 commit 521ff86
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 521ff86

Please sign in to comment.