1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for 190860: functions are folded when navigating to an unopened file (follow-up)

This commit is contained in:
Anton Leherbauer 2007-10-30 10:32:30 +00:00
parent d3fd594242
commit b03869c26a

View file

@ -1154,7 +1154,8 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi
IRegion aligned = alignRegion(branch, ctx, branch.fInclusive); IRegion aligned = alignRegion(branch, ctx, branch.fInclusive);
if (aligned != null) { if (aligned != null) {
Position alignedPos= new Position(aligned.getOffset(), aligned.getLength()); 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);
} }
} }
} }