(f)
| 5544 | // Used to add methods to editor and doc instances, wrapping them in |
| 5545 | // operations. |
| 5546 | function methodOp(f) { |
| 5547 | return function () { |
| 5548 | if (this.curOp) { |
| 5549 | return f.apply(this, arguments) |
| 5550 | } |
| 5551 | startOperation(this) |
| 5552 | try { |
| 5553 | return f.apply(this, arguments) |
| 5554 | } finally { |
| 5555 | endOperation(this) |
| 5556 | } |
| 5557 | } |
| 5558 | } |
| 5559 | function docMethodOp(f) { |
| 5560 | return function () { |
| 5561 | var cm = this.cm |
no test coverage detected