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

Function endOperation_W2

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

Source from the content-addressed store, hash-verified

5422 }
5423
5424 function endOperation_W2(op) {
5425 var cm = op.cm
5426
5427 if (op.adjustWidthTo != null) {
5428 cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"
5429 if (op.maxScrollLeft < cm.doc.scrollLeft) {
5430 setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true)
5431 }
5432 cm.display.maxLineChanged = false
5433 }
5434
5435 var takeFocus = op.focus && op.focus == activeElt()
5436 if (op.preparedSelection) {
5437 cm.display.input.showSelection(op.preparedSelection, takeFocus)
5438 }
5439 if (op.updatedDisplay || op.startHeight != cm.doc.height) {
5440 updateScrollbars(cm, op.barMeasure)
5441 }
5442 if (op.updatedDisplay) {
5443 setDocumentHeight(cm, op.barMeasure)
5444 }
5445
5446 if (op.selectionChanged) {
5447 restartBlink(cm)
5448 }
5449
5450 if (cm.state.focused && op.updateInput) {
5451 cm.display.input.reset(op.typing)
5452 }
5453 if (takeFocus) {
5454 ensureFocus(op.cm)
5455 }
5456 }
5457
5458 function endOperation_finish(op) {
5459 var cm = op.cm,

Callers 1

endOperationsFunction · 0.85

Calls 7

setScrollLeftFunction · 0.85
activeEltFunction · 0.85
updateScrollbarsFunction · 0.85
setDocumentHeightFunction · 0.85
restartBlinkFunction · 0.85
ensureFocusFunction · 0.85
minMethod · 0.80

Tested by

no test coverage detected