Index: trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js |
— | — | @@ -182,7 +182,8 @@ |
183 | 183 | es.insertIntoArray( this.model.data, this.cursor, op.data ); |
184 | 184 | this.applyAnnotations( this.cursor + op.data.length ); |
185 | 185 | node = this.model.getNodeFromOffset( this.cursor ); |
186 | | - index = node.getIndexFromOffset( this.cursor ); |
| 186 | + offset = this.model.getOffsetFromNode( node ); |
| 187 | + index = node.getIndexFromOffset( this.cursor + offset ); |
187 | 188 | this.rebuildNodes( op.data, null, node, index ); |
188 | 189 | } else { |
189 | 190 | node = this.model.getNodeFromOffset( this.cursor ); |