diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java index 16ae401893f..30559e74098 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java @@ -170,6 +170,7 @@ public class SemanticHighlightingTest extends AbstractSemanticHighlightingTest { Position[] expected= new Position[] { createPosition(11, 20, 1), createPosition(28, 35, 3), + createPosition(29, 23, 3), createPosition(30, 19, 3), createPosition(77, 21, 4), createPosition(77, 30, 4), diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java index 1240fe98e43..9ebc04fb38c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java @@ -271,9 +271,11 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener { addNodeLocation(name.getFileLocation(), highlightingStyle); } else { int offset= imageLocation.getNodeOffset(); - int length= imageLocation.getNodeLength(); - if (offset > -1 && length > 0) { - addPosition(offset, length, highlightingStyle); + if (offset >= fMinLocation) { + int length= imageLocation.getNodeLength(); + if (offset > -1 && length > 0) { + addPosition(offset, length, highlightingStyle); + } } } }