mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-28 00:11:26 +01:00
Clean up: Remove duplicated code by calling existing utility function
This commit is contained in:
parent
3589e8cf49
commit
a936644385
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user