Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-04-27 08:46:57 +0000
committerDani Megert2012-04-27 08:46:57 +0000
commita6073f82e2ac21838dda8a66bed027f735e56bbe (patch)
tree915aa9dbfc4c4c4afe38ca58e4acb3c36deb9f13
parent1b02d37376c3050930a5c0e7cb577494e267828d (diff)
downloadeclipse.platform.text-a6073f82e2ac21838dda8a66bed027f735e56bbe.tar.gz
eclipse.platform.text-a6073f82e2ac21838dda8a66bed027f735e56bbe.tar.xz
eclipse.platform.text-a6073f82e2ac21838dda8a66bed027f735e56bbe.zip
Fixed bug 373978: [syntax highlighting] "Highlight enclosing brackets"v20120427-0846I20120428-1230I20120428-0800I20120428-0140I20120427-1000I20120427-0800
should traverse out of non-default partition
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java
index f3c806abac6..51c9eeb1a03 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java
@@ -146,8 +146,12 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher, IChar
//bracket is not selected
try {
- final String partition1= TextUtilities.getContentType(document, fPartitioning, offset, false);
- final DocumentPartitionAccessor partDoc= new DocumentPartitionAccessor(document, fPartitioning, partition1);
+ final String partition= TextUtilities.getContentType(document, fPartitioning, offset, false);
+ DocumentPartitionAccessor partDoc= new DocumentPartitionAccessor(document, fPartitioning, partition);
+ IRegion enclosingPeers= findEnclosingPeers(document, partDoc, offset, length, 0, document.getLength());
+ if (enclosingPeers != null)
+ return enclosingPeers;
+ partDoc= new DocumentPartitionAccessor(document, fPartitioning, IDocument.DEFAULT_CONTENT_TYPE);
return findEnclosingPeers(document, partDoc, offset, length, 0, document.getLength());
} catch (BadLocationException ble) {
fAnchor= -1;

Back to the top