Ticket #5191: 5191.patch
File 5191.patch, 1.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/undo/plugin.js
343 343 /** 344 344 * Save a snapshot of document image for later retrieve. 345 345 */ 346 save : function( onContentOnly, image, autoFireChange )346 save : function( onContentOnly, image, autoFireChange, forRedo ) 347 347 { 348 var snapshots = this.snapshots; 348 var snapshots = this.snapshots, 349 nextImage; 349 350 350 351 // Get a content image. 351 352 if ( !image ) … … 359 360 if ( this.currentImage && image.equals( this.currentImage, onContentOnly ) ) 360 361 return false; 361 362 363 // If we are saving for a redo, the current code might have been automatically adjusted 364 // but the stored image doesn't reflect that in the currentImage, but on the next one. #5191 365 if ( !!forRedo && ((nextImage = this.getNextImage( false )) && image.equals( nextImage, onContentOnly ))) 366 return false; 367 362 368 // Drop future snapshots. 363 369 snapshots.splice( this.index + 1, snapshots.length - this.index - 1 ); 364 370 … … 485 491 { 486 492 // Try to save. If no changes have been made, the redo stack 487 493 // will not change, so it will still be redoable. 488 this.save( true );494 this.save( true, null, false, true ); 489 495 490 496 // If instead we had changes, we can't redo anymore. 491 497 if ( this.redoable() )