| 3036 | } |
| 3037 | |
| 3038 | function fireCallbacksForOps(group) { |
| 3039 | // Calls delayed callbacks and cursorActivity handlers until no |
| 3040 | // new ones appear |
| 3041 | var callbacks = group.delayedCallbacks, i = 0; |
| 3042 | do { |
| 3043 | for (; i < callbacks.length; i++) |
| 3044 | callbacks[i].call(null); |
| 3045 | for (var j = 0; j < group.ops.length; j++) { |
| 3046 | var op = group.ops[j]; |
| 3047 | if (op.cursorActivityHandlers) |
| 3048 | while (op.cursorActivityCalled < op.cursorActivityHandlers.length) |
| 3049 | op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); |
| 3050 | } |
| 3051 | } while (i < callbacks.length); |
| 3052 | } |
| 3053 | |
| 3054 | // Finish an operation, updating the display and signalling delayed events |
| 3055 | function endOperation(cm) { |