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

Function replaceRange

src/codemirror.js:4595–4600  ·  view source on GitHub ↗
(doc, code, from, to, origin)

Source from the content-addressed store, hash-verified

4593 }
4594
4595 function replaceRange(doc, code, from, to, origin) {
4596 if (!to) to = from;
4597 if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }
4598 if (typeof code == "string") code = doc.splitLines(code);
4599 makeChange(doc, {from: from, to: to, text: code, origin: origin});
4600 }
4601
4602 // SCROLLING THINGS INTO VIEW
4603

Callers 4

codemirror.jsFile · 0.85
onDropFunction · 0.85
indentLineFunction · 0.85
deleteNearSelectionFunction · 0.85

Calls 1

makeChangeFunction · 0.85

Tested by

no test coverage detected