r105947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105946‎ | r105947 | r105948 >
Date:22:51, 12 December 2011
Author:inez
Status:deferred
Tags:
Comment:
Make purgeHistory method work in SurfaceModel with new data structure
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/models/es.SurfaceModel.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/models/es.SurfaceModel.js
@@ -28,6 +28,9 @@
2929
3030 es.SurfaceModel.prototype.purgeHistory = function() {
3131 this.selection = null;
 32+ this.smallStack = [];
 33+ this.bigStack = [];
 34+ this.undoIndex = 0;
3235 };
3336
3437 /**
@@ -87,7 +90,7 @@
8891 * (such as when replacing - delete, then insert)
8992 */
9093 es.SurfaceModel.prototype.transact = function( transaction ) {
91 - this.bigStack = this.bigStack.slice( 0, this.bigStack.length - this.undoIndex + 1 );
 94+ this.bigStack = this.bigStack.slice( 0, this.bigStack.length - this.undoIndex );
9295 this.undoIndex = 0;
9396 this.smallStack.push( transaction );
9497 this.doc.commit( transaction );

Follow-up revisions

RevisionCommit summaryAuthorDate
r105958Bring CR back from r105947reedy00:13, 13 December 2011

Status & tagging log