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

Function endOperation_W2

static/editor.md/lib/codemirror/lib/codemirror.js:2994–3015  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

2992 }
2993
2994 function endOperation_W2(op) {
2995 var cm = op.cm;
2996
2997 if (op.adjustWidthTo != null) {
2998 cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
2999 if (op.maxScrollLeft < cm.doc.scrollLeft)
3000 setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);
3001 cm.display.maxLineChanged = false;
3002 }
3003
3004 if (op.preparedSelection)
3005 cm.display.input.showSelection(op.preparedSelection);
3006 if (op.updatedDisplay)
3007 setDocumentHeight(cm, op.barMeasure);
3008 if (op.updatedDisplay || op.startHeight != cm.doc.height)
3009 updateScrollbars(cm, op.barMeasure);
3010
3011 if (op.selectionChanged) restartBlink(cm);
3012
3013 if (cm.state.focused && op.updateInput)
3014 cm.display.input.reset(op.typing);
3015 }
3016
3017 function endOperation_finish(op) {
3018 var cm = op.cm, display = cm.display, doc = cm.doc;

Callers 1

endOperationsFunction · 0.70

Calls 4

setScrollLeftFunction · 0.70
setDocumentHeightFunction · 0.70
updateScrollbarsFunction · 0.70
restartBlinkFunction · 0.70

Tested by

no test coverage detected