MCPcopy Create free account
hub / github.com/witheve/Eve / endOperation_W2

Function endOperation_W2

src/codemirror.js:3122–3145  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

3120 }
3121
3122 function endOperation_W2(op) {
3123 var cm = op.cm;
3124
3125 if (op.adjustWidthTo != null) {
3126 cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
3127 if (op.maxScrollLeft < cm.doc.scrollLeft)
3128 setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);
3129 cm.display.maxLineChanged = false;
3130 }
3131
3132 var takeFocus = op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus())
3133 if (op.preparedSelection)
3134 cm.display.input.showSelection(op.preparedSelection, takeFocus);
3135 if (op.updatedDisplay || op.startHeight != cm.doc.height)
3136 updateScrollbars(cm, op.barMeasure);
3137 if (op.updatedDisplay)
3138 setDocumentHeight(cm, op.barMeasure);
3139
3140 if (op.selectionChanged) restartBlink(cm);
3141
3142 if (cm.state.focused && op.updateInput)
3143 cm.display.input.reset(op.typing);
3144 if (takeFocus) ensureFocus(op.cm);
3145 }
3146
3147 function endOperation_finish(op) {
3148 var cm = op.cm, display = cm.display, doc = cm.doc;

Callers 1

endOperationsFunction · 0.85

Calls 8

setScrollLeftFunction · 0.85
activeEltFunction · 0.85
updateScrollbarsFunction · 0.85
setDocumentHeightFunction · 0.85
restartBlinkFunction · 0.85
ensureFocusFunction · 0.85
hasFocusMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected