Skip to content

Commit 24d86a8

Browse files
committed
Stop blocking selection-undo in read-only mode
Closes codemirror#4090
1 parent 2c913e5 commit 24d86a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4419,7 +4419,7 @@
44194419

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

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

0 commit comments

Comments
 (0)