mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Bugzilla 263854
This commit is contained in:
parent
e87b55fc2c
commit
8a526a1b6d
1 changed files with 10 additions and 4 deletions
|
@ -903,12 +903,18 @@ public class FindReplaceDialog extends SelectionDialog
|
|||
throws OperationCanceledException {
|
||||
|
||||
final BigInteger searchPhraseLength = BigInteger.valueOf(searchPhrase.getByteLength());
|
||||
BigInteger range = searchForward ? end.subtract(start) : start.subtract(end);
|
||||
BigInteger currentPosition = start;
|
||||
BigInteger range = start.subtract(end);
|
||||
//BigInteger range = searchForward ? end.subtract(start) : start.subtract(end);
|
||||
//BigInteger currentPosition = start;
|
||||
BigInteger currentPosition = searchForward ? start : end.subtract(searchPhraseLength);
|
||||
|
||||
if ( range.compareTo(searchPhraseLength) >= 0 ) {
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
boolean isReplace = replaceData != null;
|
||||
|
||||
BigInteger jobs = range.subtract(searchPhraseLength);
|
||||
BigInteger jobs = range;
|
||||
BigInteger factor = BigInteger.ONE;
|
||||
if(jobs.compareTo(BigInteger.valueOf(0x07FFFFFF)) > 0)
|
||||
{
|
||||
|
@ -926,7 +932,7 @@ public class FindReplaceDialog extends SelectionDialog
|
|||
|
||||
boolean matched = false;
|
||||
while(((searchForward && currentPosition.compareTo(end.subtract(searchPhraseLength)) < 0)
|
||||
|| (!searchForward && currentPosition.compareTo(end) > 0)) && !monitor.isCanceled())
|
||||
|| (!searchForward && currentPosition.compareTo(start) > 0)) && !monitor.isCanceled())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue