MCPcopy Create free account
hub / github.com/sql-js/sql.js / selectionEventCanBeMerged

Function selectionEventCanBeMerged

GUI/codemirror/lib/codemirror.js:6678–6685  ·  view source on GitHub ↗
(doc, origin, prev, sel)

Source from the content-addressed store, hash-verified

6676 }
6677
6678 function selectionEventCanBeMerged(doc, origin, prev, sel) {
6679 var ch = origin.charAt(0);
6680 return ch == "*" ||
6681 ch == "+" &&
6682 prev.ranges.length == sel.ranges.length &&
6683 prev.somethingSelected() == sel.somethingSelected() &&
6684 new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);
6685 }
6686
6687 // Called whenever the selection changes, sets the new selection as
6688 // 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…