Skip to content

Commit

Permalink
Wrap undo/redo in an operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Narciso Jaramillo authored and marijnh committed Feb 8, 2013
1 parent 89df69d commit ae179dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -4254,8 +4254,8 @@ window.CodeMirror = (function() {
replaceSelection: function(code, collapse, origin) {
makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around");
},
undo: function() {makeChangeFromHistory(this, "undo");},
redo: function() {makeChangeFromHistory(this, "redo");},
undo: docOperation(function() {makeChangeFromHistory(this, "undo");}),
redo: docOperation(function() {makeChangeFromHistory(this, "redo");}),

setExtending: function(val) {this.sel.extend = val;},

Expand Down

0 comments on commit ae179dd

Please sign in to comment.