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

Function operation

tools/pythonauto/static/codemirror/codemirror.js:1437–1445  ·  view source on GitHub ↗
(cm1, f)

Source from the content-addressed store, hash-verified

1435
1436 // Wraps a function in an operation. Returns the wrapped function.
1437 function operation(cm1, f) {
1438 return function() {
1439 var cm = cm1 || this, withOp = !cm.curOp;
1440 if (withOp) startOperation(cm);
1441 try { var result = f.apply(cm, arguments); }
1442 finally { if (withOp) endOperation(cm); }
1443 return result;
1444 };
1445 }
1446 function docOperation(f) {
1447 return function() {
1448 var withOp = this.cm && !this.cm.curOp, result;

Callers 11

CodeMirrorFunction · 0.70
highlightWorkerFunction · 0.70
registerEventHandlersFunction · 0.70
onMouseDownFunction · 0.70
extendFunction · 0.70
onContextMenuFunction · 0.70
pollFunction · 0.70
makeChangeFunction · 0.70
makeChangeSingleDocFunction · 0.70
codemirror.jsFile · 0.70
markTextFunction · 0.70

Calls 2

startOperationFunction · 0.70
endOperationFunction · 0.70

Tested by

no test coverage detected