Skip to content

Commit 8a1479b

Browse files
committed
Allow editor-less documents to combine +-origin history events
Closes codemirror#5316
1 parent 45d5e05 commit 8a1479b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/model/history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function addChangeToHistory(doc, change, selAfter, opId) {
6767

6868
if ((hist.lastOp == opId ||
6969
hist.lastOrigin == change.origin && change.origin &&
70-
((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||
70+
((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
7171
change.origin.charAt(0) == "*")) &&
7272
(cur = lastChangeEvent(hist, hist.lastOp == opId))) {
7373
// Merge this change into the last event

0 commit comments

Comments
 (0)