r104161 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104160‎ | r104161 | r104162 >
Date:13:38, 24 November 2011
Author:catrope
Status:deferred
Tags:
Comment:
Remove unused variable index in es.TransactionProcessor.insert()
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/es.TransactionProcessor.js
@@ -240,6 +240,7 @@
241241 if ( es.DocumentModel.isStructuralOffset( this.model.data, this.cursor ) ) {
242242 es.insertIntoArray( this.model.data, this.cursor, op.data );
243243 this.applyAnnotations( this.cursor + op.data.length );
 244+
244245 node = this.model.getNodeFromOffset( this.cursor );
245246 offset = this.model.getOffsetFromNode( node );
246247 index = node.getIndexFromOffset( this.cursor - offset );
@@ -248,11 +249,9 @@
249250 node = this.model.getNodeFromOffset( this.cursor );
250251 if ( node.getParent() === this.model ) {
251252 offset = this.model.getOffsetFromNode( node );
252 - index = this.model.getIndexFromOffset( this.cursor - offset );
253253 } else {
254254 node = this.getScope( node, op.data );
255255 offset = this.model.getOffsetFromNode( node );
256 - //index = node.getIndexFromOffset( this.cursor - offset );
257256 }
258257 if ( es.DocumentModel.containsElementData( op.data ) ) {
259258 // Perform insert on linear data model

Status & tagging log