mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-13 19:20:06 +00:00
d2e23295b6
- Add heightCache map to ScrollList, keyed by item ID, avoiding repeated Render() calls purely to count lines - Rewrite GotoBottom() to walk backwards from the end in O(visible) instead of two full O(N) forward passes over all items - Replace all height-only Render() calls in clampOffset(), AtBottom(), ScrollBy(), and ScrollPercent() with cached itemHeight() lookups - Invalidate cache on width changes (SetWidth) and item mutations (AppendChunk, AppendStdout/Stderr via InvalidateItemHeight) - Refresh cache entries in View() from authoritative renders