(doc, code, from, to, origin)
| 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 |
no test coverage detected