(change)
| 4628 | // Compute the position of the end of a change (its 'to' property |
| 4629 | // refers to the pre-change end). |
| 4630 | function changeEnd(change) { |
| 4631 | if (!change.text) { return change.to } |
| 4632 | return Pos(change.from.line + change.text.length - 1, |
| 4633 | lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)) |
| 4634 | } |
| 4635 | |
| 4636 | // Adjust a position to refer to the post-change position of the |
| 4637 | // same text, or the end of the change if the change covers it. |
no test coverage detected