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

Function targetFor

src/components/VirtualMessageList.tsx:472–475  ·  view source on GitHub ↗
(i: number)

Source from the content-addressed store, hash-verified

470 // (was a safety net for frac garbage — without frac, est IS the next
471 // message's top, spam-n/N converges because message tops are ordered).
472 function targetFor(i: number): number {
473 const top = jumpState.current.getItemTop(i);
474 return Math.max(0, top - HEADROOM);
475 }
476
477 // Highlight positions[ord]. Positions are MESSAGE-RELATIVE (row 0 =
478 // element top, from scanElement). Compute rowOffset = getItemTop -

Callers 2

jumpFunction · 0.85
VirtualMessageListFunction · 0.85

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected