src/model/history.js
function lastChangeEvent(hist, force) {
  if (force) {
    clearSelectionEvents(hist.done)
    return lst(hist.done)
  } else if (hist.done.length && !lst(hist.done).ranges) {
    return lst(hist.done)
  } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
    hist.done.pop()
    return lst(hist.done)
  }
}
function lastChangeEvent(hist, force) {
  if (force) {
    clearSelectionEvents(hist.done)
    return lst(hist.done)
  } else if (hist.done.length && !lst(hist.done).ranges) {
    return lst(hist.done)
  } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
    hist.done.pop()
    return lst(hist.done)
  }
}
function lastChangeEvent ( hist , force ) { if ( force ) { clearSelectionEvents ( hist . done ) return lst ( hist . done ) } else if ( hist . done . length && ! lst ( hist . done ) . ranges ) { return lst ( hist . done ) } else if ( hist . done . length > 1 && ! hist . done [ hist . done . length - 2 ] . ranges ) { hist . done . pop ( ) return lst ( hist . done ) } }
Find the top change event in the history. Pop off selection events that are in the way.
Find the top change event in the history . Pop off selection events that are in the way .