(cm)
| 3799 | var nextOpId = 0; |
| 3800 | // Start a new operation. |
| 3801 | function startOperation(cm) { |
| 3802 | cm.curOp = { |
| 3803 | cm: cm, |
| 3804 | viewChanged: false, // Flag that indicates that lines might need to be redrawn |
| 3805 | startHeight: cm.doc.height, // Used to detect need to update scrollbar |
| 3806 | forceUpdate: false, // Used to force a redraw |
| 3807 | updateInput: 0, // Whether to reset the input textarea |
| 3808 | typing: false, // Whether this reset should be careful to leave existing text (for compositing) |
| 3809 | changeObjs: null, // Accumulated changes, for firing change events |
| 3810 | cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on |
| 3811 | cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already |
| 3812 | selectionChanged: false, // Whether the selection needs to be redrawn |
| 3813 | updateMaxLine: false, // Set when the widest line needs to be determined anew |
| 3814 | scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet |
| 3815 | scrollToPos: null, // Used to scroll to a specific position |
| 3816 | focus: false, |
| 3817 | id: ++nextOpId, // Unique ID |
| 3818 | markArrays: null // Used by addMarkedSpan |
| 3819 | }; |
| 3820 | pushOperation(cm.curOp); |
| 3821 | } |
| 3822 | |
| 3823 | // Finish an operation, updating the display and signalling delayed events |
| 3824 | function endOperation(cm) { |
no test coverage detected