(pos, from, to, diff)
| 6724 | // Rebasing/resetting history to deal with externally-sourced changes |
| 6725 | |
| 6726 | function rebaseHistSelSingle(pos, from, to, diff) { |
| 6727 | if (to < pos.line) { |
| 6728 | pos.line += diff; |
| 6729 | } else if (from < pos.line) { |
| 6730 | pos.line = from; |
| 6731 | pos.ch = 0; |
| 6732 | } |
| 6733 | } |
| 6734 | |
| 6735 | // Tries to rebase an array of history events given a change in the |
| 6736 | // document. If the change touches the same lines as the event, the |