Skip to content

Commit ae179dd

Browse files
Narciso Jaramillomarijnh
authored andcommitted
Wrap undo/redo in an operation
1 parent 89df69d commit ae179dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/codemirror.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4254,8 +4254,8 @@ window.CodeMirror = (function() {
42544254
replaceSelection: function(code, collapse, origin) {
42554255
makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around");
42564256
},
4257-
undo: function() {makeChangeFromHistory(this, "undo");},
4258-
redo: function() {makeChangeFromHistory(this, "redo");},
4257+
undo: docOperation(function() {makeChangeFromHistory(this, "undo");}),
4258+
redo: docOperation(function() {makeChangeFromHistory(this, "redo");}),
42594259

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

0 commit comments

Comments
 (0)