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:
parent
3565c7fae5
commit
be32ca5a0a
2 changed files with 8 additions and 2 deletions
|
@ -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
|
2004-09-07 Alain Magloire
|
||||||
Wrong icons
|
Wrong icons
|
||||||
* src/org/eclipse/cdt/internal/ui/cview/CViewContentProvider.java
|
* src/org/eclipse/cdt/internal/ui/cview/CViewContentProvider.java
|
||||||
|
|
|
@ -219,7 +219,8 @@ public class DefaultCFoldingStructureProvider implements IProjectionListener, IC
|
||||||
model.replaceAnnotations(null, additions);
|
model.replaceAnnotations(null, additions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
fCachedDocument= null;
|
fCachedDocument= null;
|
||||||
fAllowCollapsing= false;
|
fAllowCollapsing= false;
|
||||||
|
@ -302,7 +303,7 @@ public class DefaultCFoldingStructureProvider implements IProjectionListener, IC
|
||||||
|
|
||||||
int start= fCachedDocument.getLineOfOffset(range.getStartPos());
|
int start= fCachedDocument.getLineOfOffset(range.getStartPos());
|
||||||
int end= fCachedDocument.getLineOfOffset(range.getStartPos() + range.getLength());
|
int end= fCachedDocument.getLineOfOffset(range.getStartPos() + range.getLength());
|
||||||
if (start != end) {
|
if (start < end) {
|
||||||
int offset= fCachedDocument.getLineOffset(start);
|
int offset= fCachedDocument.getLineOffset(start);
|
||||||
int endOffset= fCachedDocument.getLineOffset(end + 1);
|
int endOffset= fCachedDocument.getLineOffset(end + 1);
|
||||||
return new Position(offset, endOffset - offset);
|
return new Position(offset, endOffset - offset);
|
||||||
|
|
Loading…
Add table
Reference in a new issue