(hist, force)
| 6569 | // Find the top change event in the history. Pop off selection |
| 6570 | // events that are in the way. |
| 6571 | function lastChangeEvent(hist, force) { |
| 6572 | if (force) { |
| 6573 | clearSelectionEvents(hist.done); |
| 6574 | return lst(hist.done); |
| 6575 | } else if (hist.done.length && !lst(hist.done).ranges) { |
| 6576 | return lst(hist.done); |
| 6577 | } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { |
| 6578 | hist.done.pop(); |
| 6579 | return lst(hist.done); |
| 6580 | } |
| 6581 | } |
| 6582 | |
| 6583 | // Register a change in the history. Merges changes that are within |
| 6584 | // a single operation, ore are close together with an origin that |
no test coverage detected