(pos, change)
| 4307 | // Adjust a position to refer to the post-change position of the |
| 4308 | // same text, or the end of the change if the change covers it. |
| 4309 | function adjustForChange(pos, change) { |
| 4310 | if (cmp(pos, change.from) < 0) return pos; |
| 4311 | if (cmp(pos, change.to) <= 0) return changeEnd(change); |
| 4312 | |
| 4313 | var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; |
| 4314 | if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch; |
| 4315 | return Pos(line, ch); |
| 4316 | } |
| 4317 | |
| 4318 | function computeSelAfterChange(doc, change) { |
| 4319 | var out = []; |
no outgoing calls
no test coverage detected