select last row if out of bounds

pull/15/head
Miguel Mota 6 years ago
parent dea43e939d
commit a3e0b1470d

@ -86,6 +86,12 @@ func (ct *Cointop) refreshTable() error {
)
}
// highlight last row if current row is out of bounds (can happen when switching views)
currentrow := ct.highlightedRowIndex()
if len(ct.coins) > currentrow {
ct.highlightRow(currentrow)
}
ct.update(func() {
ct.tableview.Clear()
ct.table.Format().Fprint(ct.tableview)

Loading…
Cancel
Save