diff options
author | Sean E. Russell <ser@ser1.net> | 2020-02-14 09:35:58 -0600 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2020-02-14 09:35:58 -0600 |
commit | f850a47d91d413de40de219aa597ade41a05f757 (patch) | |
tree | fa15d4e8ddc62888788d6814e4ab3c010931d892 /termui/table.go | |
parent | 64d4a81212a43a4b805b92963fd4da230b3ca313 (diff) | |
parent | 246ebfbff2c87f66218c42ea9490214006f2efc8 (diff) |
Merge remote-tracking branch 'rephorm/filter'
Diffstat (limited to 'termui/table.go')
-rw-r--r-- | termui/table.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/termui/table.go b/termui/table.go index eeb82af..e587839 100644 --- a/termui/table.go +++ b/termui/table.go @@ -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 |