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

Function replaceOneSelection

static/mergely/lib/codemirror.js:2149–2153  ·  view source on GitHub ↗
(doc, i, range, options)

Source from the content-addressed store, hash-verified

2147
2148 // Updates a single range in the selection.
2149 function replaceOneSelection(doc, i, range, options) {
2150 var ranges = doc.sel.ranges.slice(0);
2151 ranges[i] = range;
2152 setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);
2153 }
2154
2155 // Reset the selection to a single range.
2156 function setSimpleSelection(doc, anchor, head, options) {

Callers 3

leftButtonSelectFunction · 0.70
indentLineFunction · 0.70
codemirror.jsFile · 0.70

Calls 2

setSelectionFunction · 0.70
normalizeSelectionFunction · 0.70

Tested by

no test coverage detected