(cm)
| 3768 | var nextOpId = 0; |
| 3769 | // Start a new operation. |
| 3770 | function startOperation(cm) { |
| 3771 | cm.curOp = { |
| 3772 | cm: cm, |
| 3773 | viewChanged: false, // Flag that indicates that lines might need to be redrawn |
| 3774 | startHeight: cm.doc.height, // Used to detect need to update scrollbar |
| 3775 | forceUpdate: false, // Used to force a redraw |
| 3776 | updateInput: 0, // Whether to reset the input textarea |
| 3777 | typing: false, // Whether this reset should be careful to leave existing text (for compositing) |
| 3778 | changeObjs: null, // Accumulated changes, for firing change events |
| 3779 | cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on |
| 3780 | cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already |
| 3781 | selectionChanged: false, // Whether the selection needs to be redrawn |
| 3782 | updateMaxLine: false, // Set when the widest line needs to be determined anew |
| 3783 | scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet |
| 3784 | scrollToPos: null, // Used to scroll to a specific position |
| 3785 | focus: false, |
| 3786 | id: ++nextOpId // Unique ID |
| 3787 | }; |
| 3788 | pushOperation(cm.curOp); |
| 3789 | } |
| 3790 | |
| 3791 | // Finish an operation, updating the display and signalling delayed events |
| 3792 | function endOperation(cm) { |
no test coverage detected