Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2001-11-08 10:26:21 +0000
committerDani Megert2001-11-08 10:26:21 +0000
commitd0ef2940d9f7d4b7c115b38fbd10f65b8ae920ee (patch)
tree672f91c85e01f4e817429798346199fc1b005245
parent4d957f74e8d15c77ef066d5e414e1f1be6bab569 (diff)
downloadeclipse.platform.text-d0ef2940d9f7d4b7c115b38fbd10f65b8ae920ee.tar.gz
eclipse.platform.text-d0ef2940d9f7d4b7c115b38fbd10f65b8ae920ee.tar.xz
eclipse.platform.text-d0ef2940d9f7d4b7c115b38fbd10f65b8ae920ee.zip
Fixed find(...)
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java
index e0950a41543..f937e0fac11 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/util/StringMatcher.java
@@ -110,8 +110,9 @@ public class StringMatcher {
return new Position (start, end);
int curPos = start;
- int matchStart = -1;
- for (int i = 0; i < segCount && curPos < end; ++i) {
+ int matchStart = -1;
+ int i;
+ for (i= 0; i < segCount && curPos < end; ++i) {
String current = fSegments[i];
int nextMatch = regExpPosIn(text, curPos, end, current);
if (nextMatch < 0 )
@@ -120,6 +121,8 @@ public class StringMatcher {
matchStart = nextMatch;
curPos = nextMatch + current.length();
}
+ if (i < segCount)
+ return null;
return new Position(matchStart, curPos);
}
/**

Back to the top