(f)
| 1971 | // Used to add methods to editor and doc instances, wrapping them in |
| 1972 | // operations. |
| 1973 | function methodOp(f) { |
| 1974 | return function() { |
| 1975 | if (this.curOp) return f.apply(this, arguments); |
| 1976 | startOperation(this); |
| 1977 | try { return f.apply(this, arguments); } |
| 1978 | finally { endOperation(this); } |
| 1979 | }; |
| 1980 | } |
| 1981 | function docMethodOp(f) { |
| 1982 | return function() { |
| 1983 | var cm = this.cm; |
no test coverage detected