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

Function endOperation_W2

static/mergely/lib/codemirror.js:3101–3124  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

3099 }
3100
3101 function endOperation_W2(op) {
3102 var cm = op.cm;
3103
3104 if (op.adjustWidthTo != null) {
3105 cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
3106 if (op.maxScrollLeft < cm.doc.scrollLeft)
3107 setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);
3108 cm.display.maxLineChanged = false;
3109 }
3110
3111 if (op.preparedSelection)
3112 cm.display.input.showSelection(op.preparedSelection);
3113 if (op.updatedDisplay)
3114 setDocumentHeight(cm, op.barMeasure);
3115 if (op.updatedDisplay || op.startHeight != cm.doc.height)
3116 updateScrollbars(cm, op.barMeasure);
3117
3118 if (op.selectionChanged) restartBlink(cm);
3119
3120 if (cm.state.focused && op.updateInput)
3121 cm.display.input.reset(op.typing);
3122 if (op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus()))
3123 ensureFocus(op.cm);
3124 }
3125
3126 function endOperation_finish(op) {
3127 var cm = op.cm, display = cm.display, doc = cm.doc;

Callers 1

endOperationsFunction · 0.70

Calls 6

setScrollLeftFunction · 0.70
setDocumentHeightFunction · 0.70
updateScrollbarsFunction · 0.70
restartBlinkFunction · 0.70
activeEltFunction · 0.70
ensureFocusFunction · 0.70

Tested by

no test coverage detected