Closed james-lawrence closed 5 years ago
also the List will panic if height is too short
75 if len(trimItems) > l.innerArea.Dy() {
76 trimItems = trimItems[:l.innerArea.Dy()]
Print stack trace:
1: running [Created by termui.Init @ render.go:63]
debug stack.go:24 Stack(0x14dfd00, 0xc4200b0010, 0x14a73d5)
termui render.go:107 render.func1()
panic.go:505 panic(0x14057e0, 0x1701440)
termui list.go:76 (*List).Buffer(0xc4201dc0f0, 0, 0, 0, 0, 0)
components channels.go:123 (*Channels).Buffer(0xc4200a4300, 0, 0, 0, 0, 0)
termui grid.go:167 (*Row).Buffer(0xc42072e5a0, 0, 0, 0, 0, 0)
termui grid.go:178 (*Row).Buffer(0xc42072e660, 0, 0, 0, 0, 0)
termui grid.go:274 Grid.Buffer(0xc4202e8600, 0x2, 0x2, 0xcc, 0, 0, 0, 0, 0, 0, ...)
termui render.go:124 render(0xc420306000, 0x1, 0x1)
termui render.go:65 Init.func2()
Should be fixed now as of 958a28575d7411492d25e42da3ad5a6e5947d9a4 on master. Do note that termui has been heavily reworked in that commit, so there's a lot of breaking changes.
seems related to NewCol receiving a 0 span. however negative should never be valid at this location anyways?