Fix cursor adjustment in replace()

This commit is contained in:
Roan Kattouw 2012-03-08 23:21:28 +00:00
parent 5054ed320e
commit ab26581b2e
Notes: Roan Kattouw 2012-03-08 23:21:28 +00:00

View file

@ -461,7 +461,7 @@ ve.dm.TransactionProcessor.prototype.replace = function( op, invert ) {
// Update the linear model
ve.batchedSplice( this.model.data, this.cursor, remove.length, replacement );
this.cursor += replacement.length - remove.length;
this.cursor += replacement.length;
// TODO sync the tree too