nl_tokens: Operations are used to wrap changes in such a way that each change won t have to update the cursor and display ( which would be awkward slow and error - prone ) but instead updates are batched and then all combined and executed at once .
pl_tokens: function startOperation ( cm ) { if ( cm . curOp ) ++ cm . curOp . <mask> ; else cm . curOp = { // Nested operations delay update until the outermost one // finishes. depth : 1 , // An array of ranges of lines that have to be updated. See // updateDisplay. changes : [ ] , delayedCallbacks : [ ] , updateInput : null , userSelChange : null , textChanged : null , selectionChanged : false , updateMaxLine : false , id : ++ cm . nextOpId } ; }