MCPcopy Index your code
hub / github.com/codeaashu/claude-code / scrollBy

Function scrollBy

src/ink/components/ScrollBox.tsx:141–152  ·  view source on GitHub ↗
(dy: number)

Source from the content-addressed store, hash-verified

139 scrollMutated(box);
140 },
141 scrollBy(dy: number) {
142 const el = domRef.current;
143 if (!el) return;
144 el.stickyScroll = false;
145 // Wheel input cancels any in-flight anchor seek — user override.
146 el.scrollAnchor = undefined;
147 // Accumulate in pendingScrollDelta; renderer drains it at a capped
148 // rate so fast flicks show intermediate frames. Pure accumulator:
149 // scroll-up followed by scroll-down naturally cancels.
150 el.pendingScrollDelta = (el.pendingScrollDelta ?? 0) + Math.floor(dy);
151 scrollMutated(el);
152 },
153 scrollToBottom() {
154 const el = domRef.current;
155 if (!el) return;

Callers

nothing calls this directly

Calls 1

scrollMutatedFunction · 0.85

Tested by

no test coverage detected