diff options
author | Anton Leherbauer | 2007-10-30 10:32:30 +0000 |
---|---|---|
committer | Anton Leherbauer | 2007-10-30 10:32:30 +0000 |
commit | b03869c26a58b7f9cf65ef992053cb8ce14b3778 (patch) | |
tree | 0082ff032b039673e8d8cb062e4a39c7b6881b37 | |
parent | d3fd594242c0a9c39b7802e57cd942276e299584 (diff) | |
download | org.eclipse.cdt-b03869c26a58b7f9cf65ef992053cb8ce14b3778.tar.gz org.eclipse.cdt-b03869c26a58b7f9cf65ef992053cb8ce14b3778.tar.xz org.eclipse.cdt-b03869c26a58b7f9cf65ef992053cb8ce14b3778.zip |
Fix for 190860: functions are folded when navigating to an unopened file (follow-up)
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java index c3581905bd3..8e50bc0c2bd 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java @@ -1154,7 +1154,8 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi IRegion aligned = alignRegion(branch, ctx, branch.fInclusive); if (aligned != null) { Position alignedPos= new Position(aligned.getOffset(), aligned.getLength()); - ctx.addProjectionRange(new CProjectionAnnotation(!branch.taken() && ctx.collapseInactiveCode(), computeKey(branch, ctx), false), alignedPos); + final boolean collapse= !branch.taken() && ctx.collapseInactiveCode() && !alignedPos.includes(fCursorPosition); + ctx.addProjectionRange(new CProjectionAnnotation(collapse, computeKey(branch, ctx), false), alignedPos); } } } |