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

Bug 258043 - Folding enabled if-statements still showing when functions are folded by default

This commit is contained in:
Anton Leherbauer 2009-01-15 14:54:05 +00:00
parent 31e004f8cb
commit ddc590e5fd

View file

@ -1455,13 +1455,13 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi
* *
* @param pos * @param pos
* @param ctx * @param ctx
* @return a key to recognise an annotation position * @return a key to recognize an annotation position
*/ */
private Object computeKey(Position pos, FoldingStructureComputationContext ctx) { private Object computeKey(Position pos, FoldingStructureComputationContext ctx) {
try { try {
final IDocument document= ctx.getDocument(); final IDocument document= ctx.getDocument();
IRegion line= document.getLineInformationOfOffset(pos.offset); IRegion line= document.getLineInformationOfOffset(pos.offset);
return document.get(pos.offset, Math.min(16, line.getOffset() + line.getLength() - pos.offset)); return document.get(pos.offset, Math.min(32, line.getOffset() + line.getLength() - pos.offset));
} catch (BadLocationException exc) { } catch (BadLocationException exc) {
return exc; return exc;
} }