(doc, code, from, to, origin)
| 7406 | } |
| 7407 | |
| 7408 | function replaceRange(doc, code, from, to, origin) { |
| 7409 | var assign |
| 7410 | |
| 7411 | if (!to) { |
| 7412 | to = from |
| 7413 | } |
| 7414 | if (cmp(to, from) < 0) { |
| 7415 | ;(assign = [to, from]), (from = assign[0]), (to = assign[1]) |
| 7416 | } |
| 7417 | if (typeof code == "string") { |
| 7418 | code = doc.splitLines(code) |
| 7419 | } |
| 7420 | makeChange(doc, { from: from, to: to, text: code, origin: origin }) |
| 7421 | } |
| 7422 | |
| 7423 | // Rebasing/resetting history to deal with externally-sourced changes |
| 7424 |
no test coverage detected