Fix the cursor position when a remote patch is applied

This commit is contained in:
Yann Flory
2016-04-27 12:17:06 +02:00
parent 5bb2e12db2
commit 492054a938
2 changed files with 48 additions and 6 deletions

View File

@@ -92,6 +92,7 @@ var applyChange = function(ctx, oldval, newval, logging) {
};
var transformCursor = function (cursor, op) {
if (!op) { return cursor; }
var pos = op.offset;
var remove = op.toRemove;
var insert = op.toInsert.length;