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

2004-09-08 Alain Magloire

Fix for PR 73454.
	* src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java
This commit is contained in:
Alain Magloire 2004-09-08 15:47:39 +00:00
parent 3565c7fae5
commit be32ca5a0a
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2004-09-08 Alain Magloire
Fix for PR 73454.
* src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java
2004-09-07 Alain Magloire
Wrong icons
* src/org/eclipse/cdt/internal/ui/cview/CViewContentProvider.java

View file

@ -219,7 +219,8 @@ public class DefaultCFoldingStructureProvider implements IProjectionListener, IC
model.replaceAnnotations(null, additions);
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
fCachedDocument= null;
fAllowCollapsing= false;
@ -302,7 +303,7 @@ public class DefaultCFoldingStructureProvider implements IProjectionListener, IC
int start= fCachedDocument.getLineOfOffset(range.getStartPos());
int end= fCachedDocument.getLineOfOffset(range.getStartPos() + range.getLength());
if (start != end) {
if (start < end) {
int offset= fCachedDocument.getLineOffset(start);
int endOffset= fCachedDocument.getLineOffset(end + 1);
return new Position(offset, endOffset - offset);