r104010 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104009‎ | r104010 | r104011 >
Date:09:04, 23 November 2011
Author:inez
Status:deferred
Tags:
Comment:
Fix off by one bug in getRelativeContentOffset
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js
@@ -769,7 +769,7 @@
770770 i = offset + direction,
771771 steps = 0;
772772 distance = Math.abs( distance );
773 - while ( i > 0 && i < this.data.length - 1 ) {
 773+ while ( i > 0 && i < this.data.length ) {
774774 if ( !es.DocumentModel.isStructuralOffset( this.data, i ) ) {
775775 steps++;
776776 offset = i;

Status & tagging log