MCPcopy Create free account
hub / github.com/breck7/scroll / endOperation_R2

Function endOperation_R2

external/.scrollLibs.js:5400–5422  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

5398 }
5399
5400 function endOperation_R2(op) {
5401 var cm = op.cm,
5402 display = cm.display
5403 if (op.updatedDisplay) {
5404 updateHeightsInViewport(cm)
5405 }
5406
5407 op.barMeasure = measureForScrollbars(cm)
5408
5409 // If the max line changed since it was last measured, measure it,
5410 // and ensure the document's width matches it.
5411 // updateDisplay_W2 will use these properties to do the actual resizing
5412 if (display.maxLineChanged && !cm.options.lineWrapping) {
5413 op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3
5414 cm.display.sizerWidth = op.adjustWidthTo
5415 op.barMeasure.scrollWidth = Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth)
5416 op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm))
5417 }
5418
5419 if (op.updatedDisplay || op.selectionChanged) {
5420 op.preparedSelection = display.input.prepareSelection()
5421 }
5422 }
5423
5424 function endOperation_W2(op) {
5425 var cm = op.cm

Callers 1

endOperationsFunction · 0.85

Calls 6

updateHeightsInViewportFunction · 0.85
measureForScrollbarsFunction · 0.85
measureCharFunction · 0.85
scrollGapFunction · 0.85
displayWidthFunction · 0.85
maxMethod · 0.80

Tested by

no test coverage detected