public/javascripts/codemirror/js/undo.js
function(chains, updateFunc) {
    var shadows = [], dirty = [];
    for (var i = 0; i < chains.length; i++) {
      shadows.push(this.shadowChain(chains[i]));
      dirty.push(this[updateFunc](chains[i]));
    }
    if (updateFunc == "applyChain")
      this.notifyDirty(dirty);
    return shadows;
  }
function(chains, updateFunc) {
    var shadows = [], dirty = [];
    for (var i = 0; i < chains.length; i++) {
      shadows.push(this.shadowChain(chains[i]));
      dirty.push(this[updateFunc](chains[i]));
    }
    if (updateFunc == "applyChain")
      this.notifyDirty(dirty);
    return shadows;
  }
function ( chains , updateFunc ) { var shadows = [ ] , dirty = [ ] ; for ( var i = 0 ; i < chains . length ; i ++ ) { shadows . push ( this . shadowChain ( chains [ i ] ) ) ; dirty . push ( this [ updateFunc ] ( chains [ i ] ) ) ; } if ( updateFunc == "applyChain" ) this . notifyDirty ( dirty ) ; return shadows ; }
Update the document with a given set of chains, return its shadow. updateFunc should be "applyChain" or "linkChain". In the second case, the chains are taken to correspond the the current document, and only the state of the line data is updated. In the first case, the content of the chains is also pushed iinto the document.
Update the document with a given set of chains return its shadow . updateFunc should be applyChain or linkChain . In the second case the chains are taken to correspond the the current document and only the state of the line data is updated . In the first case the content of the chains is also pushed iinto the document .