@@ -371,8 +371,8 @@ module ts {
371
371
return false ;
372
372
}
373
373
374
- function moveElementEntirelyPastChangeRange ( element : IncrementalElement , delta : number , oldText : string , newText : string , aggressiveChecks : boolean ) {
375
- if ( element . length ) {
374
+ function moveElementEntirelyPastChangeRange ( element : IncrementalElement , isArray : boolean , delta : number , oldText : string , newText : string , aggressiveChecks : boolean ) {
375
+ if ( isArray ) {
376
376
visitArray ( < IncrementalNodeArray > element ) ;
377
377
}
378
378
else {
@@ -511,7 +511,7 @@ module ts {
511
511
if ( child . pos > changeRangeOldEnd ) {
512
512
// Node is entirely past the change range. We need to move both its pos and
513
513
// end, forward or backward appropriately.
514
- moveElementEntirelyPastChangeRange ( child , delta , oldText , newText , aggressiveChecks ) ;
514
+ moveElementEntirelyPastChangeRange ( child , /*isArray:*/ false , delta , oldText , newText , aggressiveChecks ) ;
515
515
return ;
516
516
}
517
517
@@ -537,7 +537,7 @@ module ts {
537
537
if ( array . pos > changeRangeOldEnd ) {
538
538
// Array is entirely after the change range. We need to move it, and move any of
539
539
// its children.
540
- moveElementEntirelyPastChangeRange ( array , delta , oldText , newText , aggressiveChecks ) ;
540
+ moveElementEntirelyPastChangeRange ( array , /*isArray:*/ true , delta , oldText , newText , aggressiveChecks ) ;
541
541
}
542
542
else {
543
543
// Check if the element intersects the change range. If it does, then it is not
0 commit comments