(f)
| 3188 | // Used to add methods to editor and doc instances, wrapping them in |
| 3189 | // operations. |
| 3190 | function methodOp(f) { |
| 3191 | return function() { |
| 3192 | if (this.curOp) return f.apply(this, arguments); |
| 3193 | startOperation(this); |
| 3194 | try { return f.apply(this, arguments); } |
| 3195 | finally { endOperation(this); } |
| 3196 | }; |
| 3197 | } |
| 3198 | function docMethodOp(f) { |
| 3199 | return function() { |
| 3200 | var cm = this.cm; |
no test coverage detected