MCPcopy Index your code
hub / github.com/DHTMLX/gantt / replaceRange

Function replaceRange

samples/common/codehighlight/codemirror.js:5486–5493  ·  view source on GitHub ↗
(doc, code, from, to, origin)

Source from the content-addressed store, hash-verified

5484 }
5485
5486 function replaceRange(doc, code, from, to, origin) {
5487 var assign;
5488
5489 if (!to) { to = from; }
5490 if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }
5491 if (typeof code == "string") { code = doc.splitLines(code); }
5492 makeChange(doc, {from: from, to: to, text: code, origin: origin});
5493 }
5494
5495 // Rebasing/resetting history to deal with externally-sourced changes
5496

Callers 5

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

Calls 2

cmpFunction · 0.85
makeChangeFunction · 0.85

Tested by

no test coverage detected