MCPcopy Create free account
hub / github.com/TruthHun/BookStack / replaceRange

Function replaceRange

static/mergely/lib/codemirror.js:4572–4577  ·  view source on GitHub ↗
(doc, code, from, to, origin)

Source from the content-addressed store, hash-verified

4570 }
4571
4572 function replaceRange(doc, code, from, to, origin) {
4573 if (!to) to = from;
4574 if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }
4575 if (typeof code == "string") code = doc.splitLines(code);
4576 makeChange(doc, {from: from, to: to, text: code, origin: origin});
4577 }
4578
4579 // SCROLLING THINGS INTO VIEW
4580

Callers 4

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

Calls 2

makeChangeFunction · 0.70
cmpFunction · 0.50

Tested by

no test coverage detected