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

Function extendSelections

external/.scrollLibs.js:6897–6905  ·  view source on GitHub ↗
(doc, heads, options)

Source from the content-addressed store, hash-verified

6895 // Extend all selections (pos is an array of selections with length
6896 // equal the number of selections)
6897 function extendSelections(doc, heads, options) {
6898 var out = []
6899 var extend = doc.cm && (doc.cm.display.shift || doc.extend)
6900 for (var i = 0; i < doc.sel.ranges.length; i++) {
6901 out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend)
6902 }
6903 var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex)
6904 setSelection(doc, newSel, options)
6905 }
6906
6907 // Updates a single range in the selection.
6908 function replaceOneSelection(doc, i, range, options) {

Callers 1

.scrollLibs.jsFile · 0.85

Calls 3

extendRangeFunction · 0.85
normalizeSelectionFunction · 0.85
setSelectionFunction · 0.85

Tested by

no test coverage detected