Index: trunk/extensions/VisualEditor/modules/es/models/es.SurfaceModel.js |
— | — | @@ -63,11 +63,8 @@ |
64 | 64 | * @param {es.Range} selection |
65 | 65 | * @param {Boolean} combine Whether to prevent this transaction from causing a state push |
66 | 66 | */ |
67 | | -es.SurfaceModel.prototype.select = function( selection, combine ) { |
| 67 | +es.SurfaceModel.prototype.select = function( selection ) { |
68 | 68 | selection.normalize(); |
69 | | - if ( !combine && this.shouldPushState( selection ) ) { |
70 | | - this.pushState(); |
71 | | - } |
72 | 69 | // Filter out calls to select if they do not change the selection values |
73 | 70 | var selectionChanged = !this.selection || ( |
74 | 71 | this.selection.from !== selection.from || |
— | — | @@ -80,7 +77,6 @@ |
81 | 78 | selection.from - this.states[this.states.length - 1].from |
82 | 79 | ); |
83 | 80 | } |
84 | | - this.currentState.push( selection ); |
85 | 81 | this.selection = selection; |
86 | 82 | if ( selectionChanged ) { |
87 | 83 | this.emit( 'select', this.selection.clone() ); |
Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js |
— | — | @@ -323,7 +323,7 @@ |
324 | 324 | } |
325 | 325 | } |
326 | 326 | // Apply new selection |
327 | | - this.model.select( selection, true ); |
| 327 | + this.model.select( selection ); |
328 | 328 | } |
329 | 329 | }; |
330 | 330 | |
— | — | @@ -462,7 +462,7 @@ |
463 | 463 | this.model.getDocument().getRelativeContentOffset( |
464 | 464 | this.model.getDocument().getContentLength(), -1 |
465 | 465 | ) |
466 | | - ), true ); |
| 466 | + ) ); |
467 | 467 | break; |
468 | 468 | } |
469 | 469 | // Insert content (maybe) |
— | — | @@ -518,7 +518,7 @@ |
519 | 519 | } |
520 | 520 | |
521 | 521 | selection.from = selection.to = targetOffset; |
522 | | - this.model.select( selection, true ); |
| 522 | + this.model.select( selection ); |
523 | 523 | |
524 | 524 | if ( sourceNode === targetNode || |
525 | 525 | ( typeof sourceSplitableNode !== 'undefined' && |
— | — | @@ -552,7 +552,7 @@ |
553 | 553 | tx = this.model.getDocument().prepareRemoval( selection ); |
554 | 554 | this.model.transact( tx, true ); |
555 | 555 | selection.from = selection.to = selection.start; |
556 | | - this.model.select( selection, true ); |
| 556 | + this.model.select( selection ); |
557 | 557 | } |
558 | 558 | }; |
559 | 559 | |
— | — | @@ -603,7 +603,7 @@ |
604 | 604 | selection.from = selection.to = |
605 | 605 | this.model.getDocument().getRelativeContentOffset( selection.to, 1 ); |
606 | 606 | } |
607 | | - this.model.select( selection, true ); |
| 607 | + this.model.select( selection ); |
608 | 608 | }; |
609 | 609 | |
610 | 610 | es.SurfaceView.prototype.insertFromInput = function() { |
— | — | @@ -627,7 +627,7 @@ |
628 | 628 | |
629 | 629 | selection.from += val.length; |
630 | 630 | selection.to += val.length; |
631 | | - this.model.select( selection, true ); |
| 631 | + this.model.select( selection ); |
632 | 632 | } |
633 | 633 | }; |
634 | 634 | |
— | — | @@ -811,4 +811,4 @@ |
812 | 812 | |
813 | 813 | /* Inheritance */ |
814 | 814 | |
815 | | -es.extendClass( es.SurfaceView, es.EventEmitter ); |
\ No newline at end of file |
| 815 | +es.extendClass( es.SurfaceView, es.EventEmitter ); |