MCPcopy
hub / github.com/witheve/Eve / endOperation_R2

Function endOperation_R2

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

Source from the content-addressed store, hash-verified

3099 }
3100
3101 function endOperation_R2(op) {
3102 var cm = op.cm, display = cm.display;
3103 if (op.updatedDisplay) updateHeightsInViewport(cm);
3104
3105 op.barMeasure = measureForScrollbars(cm);
3106
3107 // If the max line changed since it was last measured, measure it,
3108 // and ensure the document's width matches it.
3109 // updateDisplay_W2 will use these properties to do the actual resizing
3110 if (display.maxLineChanged && !cm.options.lineWrapping) {
3111 op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
3112 cm.display.sizerWidth = op.adjustWidthTo;
3113 op.barMeasure.scrollWidth =
3114 Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
3115 op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
3116 }
3117
3118 if (op.updatedDisplay || op.selectionChanged)
3119 op.preparedSelection = display.input.prepareSelection(op.focus);
3120 }
3121
3122 function endOperation_W2(op) {
3123 var cm = op.cm;

Callers 1

endOperationsFunction · 0.85

Calls 5

updateHeightsInViewportFunction · 0.85
measureForScrollbarsFunction · 0.85
measureCharFunction · 0.85
scrollGapFunction · 0.85
displayWidthFunction · 0.85

Tested by

no test coverage detected