MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / addToScrollTop

Function addToScrollTop

lib/web/CodeMirror/src/display/scrolling.js:110–114  ·  view source on GitHub ↗
(cm, top)

Source from the content-addressed store, hash-verified

108// Store a relative adjustment to the scroll position in the current
109// operation (to be applied when the operation finishes).
110export function addToScrollTop(cm, top) {
111 if (top == null) return
112 resolveScrollToPos(cm)
113 cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top
114}
115
116// Make sure that at the end of the operation the current cursor is
117// shown.

Callers 3

addLineWidgetFunction · 0.90
methods.jsFile · 0.90

Calls 1

resolveScrollToPosFunction · 0.70

Tested by

no test coverage detected