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

Function startOperation

static/mergely/lib/codemirror.js:2989–3015  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

2987 var nextOpId = 0;
2988 // Start a new operation.
2989 function startOperation(cm) {
2990 cm.curOp = {
2991 cm: cm,
2992 viewChanged: false, // Flag that indicates that lines might need to be redrawn
2993 startHeight: cm.doc.height, // Used to detect need to update scrollbar
2994 forceUpdate: false, // Used to force a redraw
2995 updateInput: null, // Whether to reset the input textarea
2996 typing: false, // Whether this reset should be careful to leave existing text (for compositing)
2997 changeObjs: null, // Accumulated changes, for firing change events
2998 cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on
2999 cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already
3000 selectionChanged: false, // Whether the selection needs to be redrawn
3001 updateMaxLine: false, // Set when the widest line needs to be determined anew
3002 scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
3003 scrollToPos: null, // Used to scroll to a specific position
3004 focus: false,
3005 id: ++nextOpId // Unique ID
3006 };
3007 if (operationGroup) {
3008 operationGroup.ops.push(cm.curOp);
3009 } else {
3010 cm.curOp.ownsGroup = operationGroup = {
3011 ops: [cm.curOp],
3012 delayedCallbacks: []
3013 };
3014 }
3015 }
3016
3017 function fireCallbacksForOps(group) {
3018 // Calls delayed callbacks and cursorActivity handlers until no

Callers 6

CodeMirrorFunction · 0.70
runInOpFunction · 0.70
operationFunction · 0.70
methodOpFunction · 0.70
docMethodOpFunction · 0.70
codemirror.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected