diff options
author | Dani Megert | 2004-06-07 16:25:20 +0000 |
---|---|---|
committer | Dani Megert | 2004-06-07 16:25:20 +0000 |
commit | 26b62dcbd4fed716da3399e739b2bb7c9dd02bc4 (patch) | |
tree | c102c6ab03f965cc4a17c161553032f87e96b4f5 /org.eclipse.text/src/org/eclipse | |
parent | 9d923cc11e2b9e2be7cf179045c0e60feb6ba332 (diff) | |
download | eclipse.platform.text-26b62dcbd4fed716da3399e739b2bb7c9dd02bc4.tar.gz eclipse.platform.text-26b62dcbd4fed716da3399e739b2bb7c9dd02bc4.tar.xz eclipse.platform.text-26b62dcbd4fed716da3399e739b2bb7c9dd02bc4.zip |
Fixed bug 52888: FindReplaceDocumentAdapter.findReplace() doesn't work right with REPLACE_FIND_NEXT
Diffstat (limited to 'org.eclipse.text/src/org/eclipse')
-rw-r--r-- | org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java b/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java index 20153779899..9dc71a52d50 100644 --- a/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java +++ b/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java @@ -113,7 +113,7 @@ public class FindReplaceDocumentAdapter implements CharSequence { * @throws IllegalStateException if a REPLACE or REPLACE_FIND operation is not preceded by a successful FIND operation * @throws PatternSyntaxException if a regular expression has invalid syntax */ - private IRegion findReplace(FindReplaceOperationCode operationCode, int startOffset, String findString, String replaceText, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, boolean regExSearch) throws BadLocationException { + private IRegion findReplace(final FindReplaceOperationCode operationCode, int startOffset, String findString, String replaceText, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, boolean regExSearch) throws BadLocationException { // Validate option combinations Assert.isTrue(!(regExSearch && wholeWord)); @@ -190,7 +190,8 @@ public class FindReplaceDocumentAdapter implements CharSequence { else found= fFindReplaceMatcher.find(); - fFindReplaceState= operationCode; + if (operationCode == REPLACE_FIND_NEXT) + fFindReplaceState= FIND_NEXT; if (found && fFindReplaceMatcher.group().length() > 0) { return new Region(fFindReplaceMatcher.start(), fFindReplaceMatcher.group().length()); |