(pos, from, to, diff)
| 5408 | // Rebasing/resetting history to deal with externally-sourced changes |
| 5409 | |
| 5410 | function rebaseHistSel(pos, from, to, diff) { |
| 5411 | if (to < pos.line) { |
| 5412 | pos.line += diff; |
| 5413 | } else if (from < pos.line) { |
| 5414 | pos.line = from; |
| 5415 | pos.ch = 0; |
| 5416 | } |
| 5417 | } |
| 5418 | |
| 5419 | // Tries to rebase an array of history events given a change in the |
| 5420 | // document. If the change touches the same lines as the event, the |