MCPcopy Create free account
hub / github.com/TruthHun/BookStack / selectionEventCanBeMerged

Function selectionEventCanBeMerged

static/mergely/lib/codemirror.js:7961–7968  ·  view source on GitHub ↗
(doc, origin, prev, sel)

Source from the content-addressed store, hash-verified

7959 }
7960
7961 function selectionEventCanBeMerged(doc, origin, prev, sel) {
7962 var ch = origin.charAt(0);
7963 return ch == "*" ||
7964 ch == "+" &&
7965 prev.ranges.length == sel.ranges.length &&
7966 prev.somethingSelected() == sel.somethingSelected() &&
7967 new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);
7968 }
7969
7970 // Called whenever the selection changes, sets the new selection as
7971 // the pending selection in the history, and pushes the old pending

Callers 1

addSelectionToHistoryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected