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

Function addToScrollTop

external/.scrollLibs.js:4973–4979  ·  view source on GitHub ↗
(cm, top)

Source from the content-addressed store, hash-verified

4971 // Store a relative adjustment to the scroll position in the current
4972 // operation (to be applied when the operation finishes).
4973 function addToScrollTop(cm, top) {
4974 if (top == null) {
4975 return
4976 }
4977 resolveScrollToPos(cm)
4978 cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top
4979 }
4980
4981 // Make sure that at the end of the operation the current cursor is
4982 // shown.

Callers 3

addLineWidgetFunction · 0.85
addEditorMethodsFunction · 0.85

Calls 1

resolveScrollToPosFunction · 0.85

Tested by

no test coverage detected