fix(ui): list: prevent negative offset in list rendering
commit318b2c681bb917a21b9126ef4ed2f2d1cad646f7
authorAyman Bagabas <ayman.bagabas@gmail.com>
dateThu 11 Dec 2025, 14:22 (1 year ago)
parentbea6010
internal/ui/list/list.go+1−1
@@ -333,7 +333,7 @@ func (l *List) Render() string {
333333 itemLines := strings.Split(item.content, "\n")
334334 itemHeight := len(itemLines)
335335
336− if currentOffset < itemHeight {
336+ if currentOffset >= 0 && currentOffset < itemHeight {
337337 // Add visible content lines
338338 lines = append(lines, itemLines[currentOffset:]...)
339339