(hist, force)
| 4838 | // Find the top change event in the history. Pop off selection |
| 4839 | // events that are in the way. |
| 4840 | function lastChangeEvent(hist, force) { |
| 4841 | if (force) { |
| 4842 | clearSelectionEvents(hist.done); |
| 4843 | return lst(hist.done) |
| 4844 | } else if (hist.done.length && !lst(hist.done).ranges) { |
| 4845 | return lst(hist.done) |
| 4846 | } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { |
| 4847 | hist.done.pop(); |
| 4848 | return lst(hist.done) |
| 4849 | } |
| 4850 | } |
| 4851 | |
| 4852 | // Register a change in the history. Merges changes that are within |
| 4853 | // a single operation, or are close together with an origin that |
no test coverage detected