MCPcopy
hub / github.com/pandao/editor.md / replaceRange

Function replaceRange

lib/codemirror/lib/codemirror.js:4393–4398  ·  view source on GitHub ↗
(doc, code, from, to, origin)

Source from the content-addressed store, hash-verified

4391 }
4392
4393 function replaceRange(doc, code, from, to, origin) {
4394 if (!to) to = from;
4395 if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }
4396 if (typeof code == "string") code = splitLines(code);
4397 makeChange(doc, {from: from, to: to, text: code, origin: origin});
4398 }
4399
4400 // SCROLLING THINGS INTO VIEW
4401

Callers 4

codemirror.jsFile · 0.70
onDropFunction · 0.70
indentLineFunction · 0.70
deleteNearSelectionFunction · 0.70

Calls 3

makeChangeFunction · 0.70
cmpFunction · 0.50
splitLinesFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…