@@ -308,6 +308,8 @@ func (l *List) Render() string {
308 currentOffset = 0 // Reset offset for subsequent items
308 currentOffset = 0 // Reset offset for subsequent items
311+ l.height = max(l.height, 0)
311 if len(lines) > l.height {
313 if len(lines) > l.height {
312 lines = lines[:l.height]
314 lines = lines[:l.height]