(pos, from, to, diff)
| 4759 | // Rebasing/resetting history to deal with externally-sourced changes |
| 4760 | |
| 4761 | function rebaseHistSel(pos, from, to, diff) { |
| 4762 | if (to < pos.line) { |
| 4763 | pos.line += diff; |
| 4764 | } else if (from < pos.line) { |
| 4765 | pos.line = from; |
| 4766 | pos.ch = 0; |
| 4767 | } |
| 4768 | } |
| 4769 | |
| 4770 | // Tries to rebase an array of history events given a change in the |
| 4771 | // document. If the change touches the same lines as the event, the |