Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ST takes over document factory
  • Loading branch information...
commit 2d7d46a60c4cc56b8160619435b73ba512af6602 1 parent 994e13d
Max Stepanov mstepanov authored
3  .../com.aptana.editor.common/src/com/aptana/editor/common/text/reconciler/CommonPresentationReconciler.java
View
@@ -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];
Please sign in to comment.
Something went wrong with that request. Please try again.