MCPcopy Index your code
hub / github.com/csev/py4e / widgetOperation

Function widgetOperation

tools/pythonauto/static/codemirror/codemirror.js:4325–4333  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

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;

Callers 1

codemirror.jsFile · 0.85

Calls 2

startOperationFunction · 0.70
endOperationFunction · 0.70

Tested by

no test coverage detected