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

Function replaceOneSelection

static/editor.md/lib/codemirror/lib/codemirror.js:2053–2057  ·  view source on GitHub ↗
(doc, i, range, options)

Source from the content-addressed store, hash-verified

2051
2052 // Updates a single range in the selection.
2053 function replaceOneSelection(doc, i, range, options) {
2054 var ranges = doc.sel.ranges.slice(0);
2055 ranges[i] = range;
2056 setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);
2057 }
2058
2059 // Reset the selection to a single range.
2060 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