(hist, force)
| 7902 | // Find the top change event in the history. Pop off selection |
| 7903 | // events that are in the way. |
| 7904 | function lastChangeEvent(hist, force) { |
| 7905 | if (force) { |
| 7906 | clearSelectionEvents(hist.done); |
| 7907 | return lst(hist.done); |
| 7908 | } else if (hist.done.length && !lst(hist.done).ranges) { |
| 7909 | return lst(hist.done); |
| 7910 | } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { |
| 7911 | hist.done.pop(); |
| 7912 | return lst(hist.done); |
| 7913 | } |
| 7914 | } |
| 7915 | |
| 7916 | // Register a change in the history. Merges changes that are within |
| 7917 | // a single operation, ore are close together with an origin that |
no test coverage detected