(cm)
| 2987 | var nextOpId = 0; |
| 2988 | // Start a new operation. |
| 2989 | function startOperation(cm) { |
| 2990 | cm.curOp = { |
| 2991 | cm: cm, |
| 2992 | viewChanged: false, // Flag that indicates that lines might need to be redrawn |
| 2993 | startHeight: cm.doc.height, // Used to detect need to update scrollbar |
| 2994 | forceUpdate: false, // Used to force a redraw |
| 2995 | updateInput: null, // Whether to reset the input textarea |
| 2996 | typing: false, // Whether this reset should be careful to leave existing text (for compositing) |
| 2997 | changeObjs: null, // Accumulated changes, for firing change events |
| 2998 | cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on |
| 2999 | cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already |
| 3000 | selectionChanged: false, // Whether the selection needs to be redrawn |
| 3001 | updateMaxLine: false, // Set when the widest line needs to be determined anew |
| 3002 | scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet |
| 3003 | scrollToPos: null, // Used to scroll to a specific position |
| 3004 | focus: false, |
| 3005 | id: ++nextOpId // Unique ID |
| 3006 | }; |
| 3007 | if (operationGroup) { |
| 3008 | operationGroup.ops.push(cm.curOp); |
| 3009 | } else { |
| 3010 | cm.curOp.ownsGroup = operationGroup = { |
| 3011 | ops: [cm.curOp], |
| 3012 | delayedCallbacks: [] |
| 3013 | }; |
| 3014 | } |
| 3015 | } |
| 3016 | |
| 3017 | function fireCallbacksForOps(group) { |
| 3018 | // Calls delayed callbacks and cursorActivity handlers until no |
no outgoing calls
no test coverage detected