(pos, from, to, diff)
| 7826 | // Rebasing/resetting history to deal with externally-sourced changes |
| 7827 | |
| 7828 | function rebaseHistSelSingle(pos, from, to, diff) { |
| 7829 | if (to < pos.line) { |
| 7830 | pos.line += diff; |
| 7831 | } else if (from < pos.line) { |
| 7832 | pos.line = from; |
| 7833 | pos.ch = 0; |
| 7834 | } |
| 7835 | } |
| 7836 | |
| 7837 | // Tries to rebase an array of history events given a change in the |
| 7838 | // document. If the change touches the same lines as the event, the |