MCPcopy Create free account
hub / github.com/breck7/scroll / selectionEventCanBeMerged

Function selectionEventCanBeMerged

external/.scrollLibs.js:6713–6716  ·  view source on GitHub ↗
(doc, origin, prev, sel)

Source from the content-addressed store, hash-verified

6711 }
6712
6713 function selectionEventCanBeMerged(doc, origin, prev, sel) {
6714 var ch = origin.charAt(0)
6715 return ch == "*" || (ch == "+" && prev.ranges.length == sel.ranges.length && prev.somethingSelected() == sel.somethingSelected() && new Date() - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500))
6716 }
6717
6718 // Called whenever the selection changes, sets the new selection as
6719 // the pending selection in the history, and pushes the old pending

Callers 1

addSelectionToHistoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected