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

Function addToScrollPos

src/codemirror.js:4690–4696  ·  view source on GitHub ↗
(cm, left, top)

Source from the content-addressed store, hash-verified

4688 // Store a relative adjustment to the scroll position in the current
4689 // operation (to be applied when the operation finishes).
4690 function addToScrollPos(cm, left, top) {
4691 if (left != null || top != null) resolveScrollToPos(cm);
4692 if (left != null)
4693 cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left;
4694 if (top != null)
4695 cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
4696 }
4697
4698 // Make sure that at the end of the operation the current cursor is
4699 // shown.

Callers 3

codemirror.jsFile · 0.85
addLineWidgetFunction · 0.85

Calls 1

resolveScrollToPosFunction · 0.85

Tested by

no test coverage detected