Clean up: Remove duplicated code by calling existing utility function

This commit is contained in:
David Dworken 2024-04-13 09:53:00 -07:00
parent ce080b7ecb
commit 7df61ab070
No known key found for this signature in database

View File

@ -290,10 +290,7 @@ func updateTable(m model, rows []table.Row, entries []*data.HistoryEntry, search
}
m.lastQuery = *m.runQuery
m.runQuery = nil
if m.table.Cursor() >= len(m.tableEntries) {
// Ensure that we can't scroll past the end of the table
m.table.SetCursor(len(m.tableEntries) - 1)
}
preventTableOverscrolling(m)
return m
}