Permalink
Browse files

[APSTUD-3245] check for zero number of partitions which occurs when W…

…ST takes over document factory
  • Loading branch information...
1 parent 994e13d commit 2d7d46a60c4cc56b8160619435b73ba512af6602 @mstepanov mstepanov committed Aug 10, 2011
View
3 ...tor.common/src/com/aptana/editor/common/text/reconciler/CommonPresentationReconciler.java
@@ -83,6 +83,9 @@ protected TextPresentation createPresentation(IRegion damage, IDocument document
try {
TextPresentation presentation = new TextPresentation(damage, ITERATION_PARTITION_LIMIT*5);
ITypedRegion[] partitioning = TextUtilities.computePartitioning(document, getDocumentPartitioning(), damage.getOffset(), damage.getLength(), false);
+ if (partitioning.length == 0) {
+ return presentation;
+ }
int limit = Math.min(ITERATION_PARTITION_LIMIT, partitioning.length);
for (int i = 0; i < limit; ++i) {
ITypedRegion r = partitioning[i];

0 comments on commit 2d7d46a

Please sign in to comment.