mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-22 21:41:01 +01:00
Clean up: Remove duplicated code by calling existing utility function
This commit is contained in:
parent
ce080b7ecb
commit
7df61ab070
@ -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