public/javascripts/codemirror/js/undo.js
function(doNotHighlight) {
    this.parent.clearTimeout(this.commitTimeout);
    // Make sure there are no pending dirty nodes.
    if (!doNotHighlight) this.editor.highlightDirty(true);
    // Build set of chains.
    var chains = this.touchedChains(), self = this;

    if (chains.length) {
      this.addUndoLevel(this.updateTo(chains, "linkChain"));
      this.redoHistory = [];
      this.notifyEnvironment();
    }
  }
function(doNotHighlight) {
    this.parent.clearTimeout(this.commitTimeout);
    // Make sure there are no pending dirty nodes.
    if (!doNotHighlight) this.editor.highlightDirty(true);
    // Build set of chains.
    var chains = this.touchedChains(), self = this;

    if (chains.length) {
      this.addUndoLevel(this.updateTo(chains, "linkChain"));
      this.redoHistory = [];
      this.notifyEnvironment();
    }
  }
function ( doNotHighlight ) { this . parent . clearTimeout ( this . commitTimeout ) ; // Make sure there are no pending dirty nodes. if ( ! doNotHighlight ) this . editor . highlightDirty ( true ) ; // Build set of chains. var chains = this . touchedChains ( ) , self = this ; if ( chains . length ) { this . addUndoLevel ( this . updateTo ( chains , "linkChain" ) ) ; this . redoHistory = [ ] ; this . notifyEnvironment ( ) ; } }
Check whether the touched nodes hold any changes, if so, commit them.
Check whether the touched nodes hold any changes if so commit them .