Skip to content

Commit

Permalink
Stop blocking selection-undo in read-only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Jun 28, 2016
1 parent 2c913e5 commit 24d86a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -4419,7 +4419,7 @@

// Revert a change stored in a document's history.
function makeChangeFromHistory(doc, type, allowSelectionOnly) {
if (doc.cm && doc.cm.state.suppressEdits) return;
if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) return;

var hist = doc.history, event, selAfter = doc.sel;
var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
Expand Down

0 comments on commit 24d86a8

Please sign in to comment.