MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / adjustScroll

Function adjustScroll

packages/bumpy/src/prompts/bump-select.ts:148–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146 const focusedRowIdx = itemRowIndex[cursor]!;
147
148 const adjustScroll = () => {
149 if (focusedRowIdx < scroll) {
150 scroll = focusedRowIdx;
151 } else if (focusedRowIdx >= scroll + windowSize) {
152 scroll = focusedRowIdx - windowSize + 1;
153 }
154 scroll = Math.max(0, Math.min(scroll, rows.length - windowSize));
155 };
156
157 adjustScroll();
158

Callers 1

renderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…