(hist, force)
| 7934 | // Find the top change event in the history. Pop off selection |
| 7935 | // events that are in the way. |
| 7936 | function lastChangeEvent(hist, force) { |
| 7937 | if (force) { |
| 7938 | clearSelectionEvents(hist.done); |
| 7939 | return lst(hist.done); |
| 7940 | } else if (hist.done.length && !lst(hist.done).ranges) { |
| 7941 | return lst(hist.done); |
| 7942 | } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { |
| 7943 | hist.done.pop(); |
| 7944 | return lst(hist.done); |
| 7945 | } |
| 7946 | } |
| 7947 | |
| 7948 | // Register a change in the history. Merges changes that are within |
| 7949 | // a single operation, ore are close together with an origin that |
no test coverage detected