(doc, heads, options)
| 43 | // Extend all selections (pos is an array of selections with length |
| 44 | // equal the number of selections) |
| 45 | export function extendSelections(doc, heads, options) { |
| 46 | let out = [] |
| 47 | let extend = doc.cm && (doc.cm.display.shift || doc.extend) |
| 48 | for (let i = 0; i < doc.sel.ranges.length; i++) |
| 49 | out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend) |
| 50 | let newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex) |
| 51 | setSelection(doc, newSel, options) |
| 52 | } |
| 53 | |
| 54 | // Updates a single range in the selection. |
| 55 | export function replaceOneSelection(doc, i, range, options) { |
no test coverage detected