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

Function rangeWidth

src/utils/horizontalScroll.ts:60–68  ·  view source on GitHub ↗
(start: number, end: number)

Source from the content-addressed store, hash-verified

58
59 // Helper to get width of range [start, end)
60 function rangeWidth(start: number, end: number): number {
61 const baseWidth = cumulativeWidths[end]! - cumulativeWidths[start]!
62 // When starting after index 0 and first item has separator baked in,
63 // subtract 1 because we don't render leading separator on first visible item
64 if (firstItemHasSeparator && start > 0) {
65 return baseWidth - 1
66 }
67 return baseWidth
68 }
69
70 // Calculate effective available width based on whether we'll show arrows
71 function getEffectiveWidth(start: number, end: number): number {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected