MCPcopy Create free account
hub / github.com/breck7/scroll / operation

Function operation

external/.scrollLibs.js:5531–5543  ·  view source on GitHub ↗
(cm, f)

Source from the content-addressed store, hash-verified

5529 }
5530 // Wraps a function in an operation. Returns the wrapped function.
5531 function operation(cm, f) {
5532 return function () {
5533 if (cm.curOp) {
5534 return f.apply(cm, arguments)
5535 }
5536 startOperation(cm)
5537 try {
5538 return f.apply(cm, arguments)
5539 } finally {
5540 endOperation(cm)
5541 }
5542 }
5543 }
5544 // Used to add methods to editor and doc instances, wrapping them in
5545 // operations.
5546 function methodOp(f) {

Callers 11

makeChangeFunction · 0.85
makeChangeSingleDocFunction · 0.85
markTextFunction · 0.85
loadFileFunction · 0.85
leftButtonStartDragFunction · 0.85
extendFunction · 0.85
leftButtonSelectFunction · 0.85
registerEventHandlersFunction · 0.85
addEditorMethodsFunction · 0.85
.scrollLibs.jsFile · 0.85
pollFunction · 0.85

Calls 2

startOperationFunction · 0.85
endOperationFunction · 0.85

Tested by

no test coverage detected