(pos, from, to, diff)
| 7423 | // Rebasing/resetting history to deal with externally-sourced changes |
| 7424 | |
| 7425 | function rebaseHistSelSingle(pos, from, to, diff) { |
| 7426 | if (to < pos.line) { |
| 7427 | pos.line += diff |
| 7428 | } else if (from < pos.line) { |
| 7429 | pos.line = from |
| 7430 | pos.ch = 0 |
| 7431 | } |
| 7432 | } |
| 7433 | |
| 7434 | // Tries to rebase an array of history events given a change in the |
| 7435 | // document. If the change touches the same lines as the event, the |