[BUG_FIXED] (Author:Alexander van der Lokken) Fix "Replace all" feature hangs on the Regular Expression '$'.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@795 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
1b590704f6
commit
d31369f267
|
@ -1639,6 +1639,12 @@ int FindReplaceDlg::processRange(ProcessOperation op, const TCHAR *txt2find, con
|
|||
}
|
||||
|
||||
}
|
||||
nbProcessed++;
|
||||
|
||||
// After the processing of the last string occurence the search loop should be stopped
|
||||
// This helps to avoid the endless replacement during the EOL ("$") searching
|
||||
if( targetStart + foundTextLen == endRange )
|
||||
break;
|
||||
|
||||
if (!foundTextLen && !replaceDelta)
|
||||
startRange = targetStart + foundTextLen + 1; // find a empty string so just step forword
|
||||
|
@ -1646,8 +1652,6 @@ int FindReplaceDlg::processRange(ProcessOperation op, const TCHAR *txt2find, con
|
|||
startRange = targetStart + foundTextLen + replaceDelta; //search from result onwards
|
||||
endRange += replaceDelta; //adjust end of range in case of replace
|
||||
|
||||
nbProcessed++;
|
||||
|
||||
targetStart = (*_ppEditView)->searchInTarget(pTextFind, stringSizeFind, startRange, endRange);
|
||||
}
|
||||
delete [] pTextFind;
|
||||
|
|
Loading…
Reference in New Issue