(doc, code, from, to, origin)
| 268 | } |
| 269 | |
| 270 | export function replaceRange(doc, code, from, to, origin) { |
| 271 | if (!to) to = from |
| 272 | if (cmp(to, from) < 0) [from, to] = [to, from] |
| 273 | if (typeof code == "string") code = doc.splitLines(code) |
| 274 | makeChange(doc, {from, to, text: code, origin}) |
| 275 | } |
| 276 | |
| 277 | // Rebasing/resetting history to deal with externally-sourced changes |
| 278 |
no test coverage detected