| 3015 | } |
| 3016 | |
| 3017 | function fireCallbacksForOps(group) { |
| 3018 | // Calls delayed callbacks and cursorActivity handlers until no |
| 3019 | // new ones appear |
| 3020 | var callbacks = group.delayedCallbacks, i = 0; |
| 3021 | do { |
| 3022 | for (; i < callbacks.length; i++) |
| 3023 | callbacks[i].call(null); |
| 3024 | for (var j = 0; j < group.ops.length; j++) { |
| 3025 | var op = group.ops[j]; |
| 3026 | if (op.cursorActivityHandlers) |
| 3027 | while (op.cursorActivityCalled < op.cursorActivityHandlers.length) |
| 3028 | op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); |
| 3029 | } |
| 3030 | } while (i < callbacks.length); |
| 3031 | } |
| 3032 | |
| 3033 | // Finish an operation, updating the display and signalling delayed events |
| 3034 | function endOperation(cm) { |