Fix counter when list has 0 items.

This commit is contained in:
Brian Mattern 2019-06-03 15:18:40 -07:00
parent bb44c222ef
commit 6d0eae1f0b

View File

@ -131,6 +131,9 @@ func (self *Table) Draw(buf *Buffer) {
func (self *Table) drawLocation(buf *Buffer) {
total := len(self.Rows)
topRow := self.TopRow + 1
if topRow > total {
topRow = total
}
bottomRow := self.TopRow + self.Inner.Dy() - 1
if bottomRow > total {
bottomRow = total