Almost working draft of basic undo coalescence
This commit is contained in:
parent
7798de7bd3
commit
277675525b
4 changed files with 64 additions and 4 deletions
|
|
@ -63,6 +63,9 @@ var UndoManager = function() {
|
|||
this.execute = function(options) {
|
||||
var deltas = options.args[0];
|
||||
this.$doc = options.args[1];
|
||||
if (options.merge && this.hasUndo()){
|
||||
deltas = this.$undoStack.pop().concat(deltas);
|
||||
}
|
||||
this.$undoStack.push(deltas);
|
||||
this.$redoStack = [];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue