(cm)
| 5305 | var nextOpId = 0 |
| 5306 | // Start a new operation. |
| 5307 | function startOperation(cm) { |
| 5308 | cm.curOp = { |
| 5309 | cm: cm, |
| 5310 | viewChanged: false, // Flag that indicates that lines might need to be redrawn |
| 5311 | startHeight: cm.doc.height, // Used to detect need to update scrollbar |
| 5312 | forceUpdate: false, // Used to force a redraw |
| 5313 | updateInput: 0, // Whether to reset the input textarea |
| 5314 | typing: false, // Whether this reset should be careful to leave existing text (for compositing) |
| 5315 | changeObjs: null, // Accumulated changes, for firing change events |
| 5316 | cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on |
| 5317 | cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already |
| 5318 | selectionChanged: false, // Whether the selection needs to be redrawn |
| 5319 | updateMaxLine: false, // Set when the widest line needs to be determined anew |
| 5320 | scrollLeft: null, |
| 5321 | scrollTop: null, // Intermediate scroll position, not pushed to DOM yet |
| 5322 | scrollToPos: null, // Used to scroll to a specific position |
| 5323 | focus: false, |
| 5324 | id: ++nextOpId // Unique ID |
| 5325 | } |
| 5326 | pushOperation(cm.curOp) |
| 5327 | } |
| 5328 | |
| 5329 | // Finish an operation, updating the display and signalling delayed events |
| 5330 | function endOperation(cm) { |
no test coverage detected