MCPcopy Create free account
hub / github.com/TruthHun/BookStack / runInOp

Function runInOp

static/mergely/lib/codemirror.js:3173–3178  ·  view source on GitHub ↗
(cm, f)

Source from the content-addressed store, hash-verified

3171
3172 // Run the given function in an operation
3173 function runInOp(cm, f) {
3174 if (cm.curOp) return f();
3175 startOperation(cm);
3176 try { return f(); }
3177 finally { endOperation(cm); }
3178 }
3179 // Wraps a function in an operation. Returns the wrapped function.
3180 function operation(cm, f) {
3181 return function() {

Callers 4

handlePasteFunction · 0.70
codemirror.jsFile · 0.70
highlightWorkerFunction · 0.70
deleteNearSelectionFunction · 0.70

Calls 3

fFunction · 0.70
startOperationFunction · 0.70
endOperationFunction · 0.70

Tested by

no test coverage detected