Skip to content

Commit

Permalink
Fixed offset adjustment for lists when they are temporarily of height…
Browse files Browse the repository at this point in the history
… 0, fixes rivo#791
  • Loading branch information
rivo committed Jan 4, 2023
1 parent 807cb4d commit 892d1a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 559,9 @@ func (l *List) Draw(screen tcell.Screen) {
// view.
func (l *List) adjustOffset() {
_, _, _, height := l.GetInnerRect()
if height == 0 {
return
}
if l.currentItem < l.itemOffset {
l.itemOffset = l.currentItem
} else if l.showSecondaryText {
Expand Down

0 comments on commit 892d1a2

Please sign in to comment.