mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +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 {
|
throws OperationCanceledException {
|
||||||
|
|
||||||
final BigInteger searchPhraseLength = BigInteger.valueOf(searchPhrase.getByteLength());
|
final BigInteger searchPhraseLength = BigInteger.valueOf(searchPhrase.getByteLength());
|
||||||
BigInteger range = searchForward ? end.subtract(start) : start.subtract(end);
|
BigInteger range = start.subtract(end);
|
||||||
BigInteger currentPosition = start;
|
//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;
|
boolean isReplace = replaceData != null;
|
||||||
|
|
||||||
BigInteger jobs = range.subtract(searchPhraseLength);
|
BigInteger jobs = range;
|
||||||
BigInteger factor = BigInteger.ONE;
|
BigInteger factor = BigInteger.ONE;
|
||||||
if(jobs.compareTo(BigInteger.valueOf(0x07FFFFFF)) > 0)
|
if(jobs.compareTo(BigInteger.valueOf(0x07FFFFFF)) > 0)
|
||||||
{
|
{
|
||||||
|
@ -926,7 +932,7 @@ public class FindReplaceDialog extends SelectionDialog
|
||||||
|
|
||||||
boolean matched = false;
|
boolean matched = false;
|
||||||
while(((searchForward && currentPosition.compareTo(end.subtract(searchPhraseLength)) < 0)
|
while(((searchForward && currentPosition.compareTo(end.subtract(searchPhraseLength)) < 0)
|
||||||
|| (!searchForward && currentPosition.compareTo(end) > 0)) && !monitor.isCanceled())
|
|| (!searchForward && currentPosition.compareTo(start) > 0)) && !monitor.isCanceled())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue