MCPcopy Index your code
hub / github.com/csev/py4e / replaceRange

Function replaceRange

tools/pythonauto/static/codemirrorepl/codemirror.js:3462–3467  ·  view source on GitHub ↗
(doc, code, from, to, origin)

Source from the content-addressed store, hash-verified

3460 }
3461
3462 function replaceRange(doc, code, from, to, origin) {
3463 if (!to) to = from;
3464 if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }
3465 if (typeof code == "string") code = splitLines(code);
3466 makeChange(doc, {from: from, to: to, text: code, origin: origin});
3467 }
3468
3469 // SCROLLING THINGS INTO VIEW
3470

Callers 4

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

Calls 2

cmpFunction · 0.85
makeChangeFunction · 0.70

Tested by

no test coverage detected