MCPcopy
hub / github.com/jagenjo/webglstudio.js / runInOp

Function runInOp

editor/js/extra/codemirror/codemirror.js:3178–3183  ·  view source on GitHub ↗
(cm, f)

Source from the content-addressed store, hash-verified

3176
3177 // Run the given function in an operation
3178 function runInOp(cm, f) {
3179 if (cm.curOp) return f();
3180 startOperation(cm);
3181 try { return f(); }
3182 finally { endOperation(cm); }
3183 }
3184 // Wraps a function in an operation. Returns the wrapped function.
3185 function operation(cm, f) {
3186 return function() {

Callers 4

handlePasteFunction · 0.85
codemirror.jsFile · 0.85
highlightWorkerFunction · 0.85
deleteNearSelectionFunction · 0.85

Calls 3

startOperationFunction · 0.85
endOperationFunction · 0.85
fFunction · 0.50

Tested by

no test coverage detected