MCPcopy
hub / github.com/DHTMLX/gantt / computeSelAfterChange

Function computeSelAfterChange

samples/common/codehighlight/codemirror.js:4647–4655  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

4645 }
4646
4647 function computeSelAfterChange(doc, change) {
4648 var out = [];
4649 for (var i = 0; i < doc.sel.ranges.length; i++) {
4650 var range = doc.sel.ranges[i];
4651 out.push(new Range(adjustForChange(range.anchor, change),
4652 adjustForChange(range.head, change)));
4653 }
4654 return normalizeSelection(doc.cm, out, doc.sel.primIndex)
4655 }
4656
4657 function offsetPos(pos, old, nw) {
4658 if (pos.line == old.line)

Callers 3

makeChangeInnerFunction · 0.85
loopFunction · 0.85
makeChangeSingleDocFunction · 0.85

Calls 2

adjustForChangeFunction · 0.85
normalizeSelectionFunction · 0.85

Tested by

no test coverage detected