(f)
| 4323 | }; |
| 4324 | eventMixin(LineWidget); |
| 4325 | function widgetOperation(f) { |
| 4326 | return function() { |
| 4327 | var withOp = !this.cm.curOp; |
| 4328 | if (withOp) startOperation(this.cm); |
| 4329 | try {var result = f.apply(this, arguments);} |
| 4330 | finally {if (withOp) endOperation(this.cm);} |
| 4331 | return result; |
| 4332 | }; |
| 4333 | } |
| 4334 | LineWidget.prototype.clear = widgetOperation(function() { |
| 4335 | var ws = this.line.widgets, no = lineNo(this.line); |
| 4336 | if (no == null || !ws) return; |
no test coverage detected