(doc, heads, options)
| 5055 | // Extend all selections (pos is an array of selections with length |
| 5056 | // equal the number of selections) |
| 5057 | function extendSelections(doc, heads, options) { |
| 5058 | var out = []; |
| 5059 | var extend = doc.cm && (doc.cm.display.shift || doc.extend); |
| 5060 | for (var i = 0; i < doc.sel.ranges.length; i++) |
| 5061 | { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); } |
| 5062 | var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex); |
| 5063 | setSelection(doc, newSel, options); |
| 5064 | } |
| 5065 | |
| 5066 | // Updates a single range in the selection. |
| 5067 | function replaceOneSelection(doc, i, range, options) { |
no test coverage detected