/** Get the edit session. */
  public void remember(EditSession editSession) {
    // Don't store anything if no changes were made
    if (editSession.size() == 0) {
      return;
    }

    // Destroy any sessions after this undo point
    while (historyPointer < history.size()) {
      history.remove(historyPointer);
    }
    history.add(editSession);
    while (history.size() > MAX_HISTORY_SIZE) {
      history.remove(0);
    }
    historyPointer = history.size();
  }