MCPcopy
hub / github.com/witheve/Eve / computeSelAfterChange

Function computeSelAfterChange

src/codemirror.js:4318–4326  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

4316 }
4317
4318 function computeSelAfterChange(doc, change) {
4319 var out = [];
4320 for (var i = 0; i < doc.sel.ranges.length; i++) {
4321 var range = doc.sel.ranges[i];
4322 out.push(new Range(adjustForChange(range.anchor, change),
4323 adjustForChange(range.head, change)));
4324 }
4325 return normalizeSelection(out, doc.sel.primIndex);
4326 }
4327
4328 function offsetPos(pos, old, nw) {
4329 if (pos.line == old.line)

Callers 3

makeChangeInnerFunction · 0.85
makeChangeFromHistoryFunction · 0.85
makeChangeSingleDocFunction · 0.85

Calls 2

adjustForChangeFunction · 0.85
normalizeSelectionFunction · 0.85

Tested by

no test coverage detected