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

Function replaceOneSelection

external/.scrollLibs.js:6908–6912  ·  view source on GitHub ↗
(doc, i, range, options)

Source from the content-addressed store, hash-verified

6906
6907 // Updates a single range in the selection.
6908 function replaceOneSelection(doc, i, range, options) {
6909 var ranges = doc.sel.ranges.slice(0)
6910 ranges[i] = range
6911 setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options)
6912 }
6913
6914 // Reset the selection to a single range.
6915 function setSimpleSelection(doc, anchor, head, options) {

Callers 3

leftButtonSelectFunction · 0.85
indentLineFunction · 0.85
addEditorMethodsFunction · 0.85

Calls 3

setSelectionFunction · 0.85
normalizeSelectionFunction · 0.85
sliceMethod · 0.80

Tested by

no test coverage detected