diff --git a/cointop/table.go b/cointop/table.go index 1664cb6..4d0e710 100644 --- a/cointop/table.go +++ b/cointop/table.go @@ -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)