fix(list): prevent panic due to negative index
commit1073723a7e7d2f5c16ec7fd15b05974fc7293bf2
authorAndrey Nering <andreynering@users.noreply.github.com>
dateTue 20 Jan 2026, 16:44 (9 months ago)
parent5454a2e
internal/ui/list/list.go+2
@@ -308,6 +308,8 @@ func (l *List) Render() string {
308308 currentOffset = 0 // Reset offset for subsequent items
309309 }
310310
311+ l.height = max(l.height, 0)
312+
311313 if len(lines) > l.height {
312314 lines = lines[:l.height]
313315 }