MCPcopy Create free account
hub / github.com/codeaashu/claude-code / scrollUp

Function scrollUp

src/components/ScrollKeybindingHandler.tsx:873–882  ·  view source on GitHub ↗
(s: ScrollBoxHandle, amount: number)

Source from the content-addressed store, hash-verified

871// can cover and intermediate drain frames render at scrollTops with no
872// mounted children — blank viewport.
873export function scrollUp(s: ScrollBoxHandle, amount: number): void {
874 // Include pendingDelta: scrollBy accumulates without updating scrollTop,
875 // so getScrollTop() alone is stale within a batch of wheel events.
876 const effectiveTop = s.getScrollTop() + s.getPendingDelta();
877 if (effectiveTop - amount <= 0) {
878 s.scrollTo(0);
879 return;
880 }
881 s.scrollBy(-amount);
882}
883export type ModalPagerAction = 'lineUp' | 'lineDown' | 'halfPageUp' | 'halfPageDown' | 'fullPageUp' | 'fullPageDown' | 'top' | 'bottom';
884
885/**

Callers 1

ScrollKeybindingHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected