mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 07:15:21 +02:00
Make volatile Find uses least-strict option settings
Fix #13145, close #13159
This commit is contained in:
parent
4fd972cda3
commit
b077c58b5d
@ -1378,15 +1378,19 @@ void Notepad_plus::command(int id)
|
|||||||
case IDM_SEARCH_VOLATILE_FINDNEXT :
|
case IDM_SEARCH_VOLATILE_FINDNEXT :
|
||||||
case IDM_SEARCH_VOLATILE_FINDPREV :
|
case IDM_SEARCH_VOLATILE_FINDPREV :
|
||||||
{
|
{
|
||||||
TCHAR text2Find[MAX_PATH] = { '\0' };
|
const int strSize = FINDREPLACE_MAXLENGTH;
|
||||||
_pEditView->getGenericSelectedText(text2Find, MAX_PATH);
|
TCHAR str[strSize] = { '\0' };
|
||||||
|
_pEditView->getGenericSelectedText(str, strSize);
|
||||||
|
|
||||||
FindOption op;
|
FindOption op;
|
||||||
|
op._isMatchCase = false;
|
||||||
op._isWholeWord = false;
|
op._isWholeWord = false;
|
||||||
|
op._isWrapAround = true;
|
||||||
|
op._searchType = FindNormal;
|
||||||
op._whichDirection = (id == IDM_SEARCH_VOLATILE_FINDNEXT ? DIR_DOWN : DIR_UP);
|
op._whichDirection = (id == IDM_SEARCH_VOLATILE_FINDNEXT ? DIR_DOWN : DIR_UP);
|
||||||
|
|
||||||
FindStatus status = FSNoMessage;
|
FindStatus status = FSNoMessage;
|
||||||
_findReplaceDlg.processFindNext(text2Find, &op, &status);
|
_findReplaceDlg.processFindNext(str, &op, &status);
|
||||||
if (status == FSEndReached)
|
if (status == FSEndReached)
|
||||||
{
|
{
|
||||||
generic_string msg = _nativeLangSpeaker.getLocalizedStrFromID("find-status-end-reached", TEXT("Find: Found the 1st occurrence from the top. The end of the document has been reached."));
|
generic_string msg = _nativeLangSpeaker.getLocalizedStrFromID("find-status-end-reached", TEXT("Find: Found the 1st occurrence from the top. The end of the document has been reached."));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user