|
|
@ -1189,16 +1189,16 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op |
|
|
|
int start, end; |
|
|
|
int start, end; |
|
|
|
int posFind; |
|
|
|
int posFind; |
|
|
|
|
|
|
|
|
|
|
|
(*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); |
|
|
|
// Never allow a zero length match in the middle of a line end marker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Don't allow a search to start in the middle of a line end marker
|
|
|
|
|
|
|
|
if ((*_ppEditView)->execute(SCI_GETCHARAT, startPosition - 1) == '\r' |
|
|
|
if ((*_ppEditView)->execute(SCI_GETCHARAT, startPosition - 1) == '\r' |
|
|
|
&& (*_ppEditView)->execute(SCI_GETCHARAT, startPosition) == '\n')
|
|
|
|
&& (*_ppEditView)->execute(SCI_GETCHARAT, startPosition) == '\n')
|
|
|
|
{ |
|
|
|
{ |
|
|
|
++startPosition; |
|
|
|
flags = (flags & ~SCFIND_REGEXP_EMPTYMATCH_MASK) | SCFIND_REGEXP_EMPTYMATCH_NONE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
posFind = (*_ppEditView)->searchInTarget(pText, stringSizeFind, startPosition, endPosition); |
|
|
|
posFind = (*_ppEditView)->searchInTarget(pText, stringSizeFind, startPosition, endPosition); |
|
|
|
if (posFind == -1) //no match found in target, check if a new target should be used
|
|
|
|
if (posFind == -1) //no match found in target, check if a new target should be used
|
|
|
|
{ |
|
|
|
{ |
|
|
@ -1329,6 +1329,10 @@ bool FindReplaceDlg::processReplace(const TCHAR *txt2find, const TCHAR *txt2repl |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if (replaceOptions._searchType == FindExtended) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Searching::convertExtendedToString(pTextReplace, pTextReplace, stringSizeReplace); |
|
|
|
|
|
|
|
} |
|
|
|
replacedLen = (*_ppEditView)->replaceTarget(pTextReplace); |
|
|
|
replacedLen = (*_ppEditView)->replaceTarget(pTextReplace); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|