From ab26581b2ee2f1bb59ac95dc91ae9746412bface Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 8 Mar 2012 23:21:28 +0000 Subject: [PATCH] Fix cursor adjustment in replace() --- modules/ve/dm/ve.dm.TransactionProcessor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve/dm/ve.dm.TransactionProcessor.js b/modules/ve/dm/ve.dm.TransactionProcessor.js index 112c254874..3418a7bdab 100644 --- a/modules/ve/dm/ve.dm.TransactionProcessor.js +++ b/modules/ve/dm/ve.dm.TransactionProcessor.js @@ -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