Fix botched rename: opReplacement -> opInsert

Change-Id: I34091dbbc9a46466823ee7407f151fd67112ee03
This commit is contained in:
Catrope 2012-05-14 15:03:44 -07:00
parent e0de881a8a
commit 5b398f95f8

View file

@ -251,9 +251,9 @@ ve.dm.TransactionProcessor.prototype.replace = function( op ) {
var opRemove = this.reversed ? operation.insert : operation.remove,
opInsert = this.reversed ? operation.remove : operation.insert;
// Update the linear model for this insert
ve.batchSplice( this.document.data, this.cursor, opRemove.length, opReplacement );
this.cursor += opReplacement.length;
adjustment += opReplacement.length - opRemove.length;
ve.batchSplice( this.document.data, this.cursor, opRemove.length, opInsert );
this.cursor += opInsert.length;
adjustment += opInsert.length - opRemove.length;
// Walk through the remove and insert data
// and keep track of the element depth change (level)
@ -271,8 +271,8 @@ ve.dm.TransactionProcessor.prototype.replace = function( op ) {
removeLevel++;
}
}
for ( i = 0; i < opReplacement.length; i++ ) {
type = opReplacement[i].type;
for ( i = 0; i < opInsert.length; i++ ) {
type = opInsert[i].type;
if ( type === undefined ) {
// This is content, ignore
} else if ( type.charAt( 0 ) === '/' ) {