ckeditor/ckeditor-dev — pull request #93 by azaslavsky (2014-04-11 01:20:59+00:00)
Title: Added "dontUpdate" parameter to undoManager.unlock

Very small change I've used in my implementation of CKEDITOR, thought it might be useful in the public API. At the current moment, you can call lockSnapshot with the with the dontUpdate option, preventing an update to the latest snapshot in the undo stack, like so:
```
editor.fire('lockSnapshot', {dontUpdate: true});
```

This option doesn't exist for undo snapShot. In cases where you need to unlock a previously locked editor, but don't want to update the latest undo state, it would be useful to have a dontUpdate option on the unlockSnapshot event as well. Example:
```
editor.on('paste', function(e){
//Firing the paste event locks the undoManager by default
/* DO SOME DOM MANIPULATION TO PREPARE FOR PASTE */
editor.fire('unlockSnapshot', {dontUpdate: true}); //Instead of updating this current snapshot in the DOM, I want to create a brand new one; previously, this would have been impossible, as the unlockSnapshot event automatically updates the latest snapshot with the current DOM changes
editor.fire('saveSnapshot'); //Save my new snapshot
editor.fire('lockSnapshot', {dontUpdate: true}); //Re-lock the snapshot
e.data.dataValue = 'Whatever I'm pasting';
});

```