(f)
| 187 | // Used to add methods to editor and doc instances, wrapping them in |
| 188 | // operations. |
| 189 | export function methodOp(f) { |
| 190 | return function() { |
| 191 | if (this.curOp) return f.apply(this, arguments) |
| 192 | startOperation(this) |
| 193 | try { return f.apply(this, arguments) } |
| 194 | finally { endOperation(this) } |
| 195 | } |
| 196 | } |
| 197 | export function docMethodOp(f) { |
| 198 | return function() { |
| 199 | let cm = this.cm |
no test coverage detected