fix: Scrolls past bottom line

This commit is contained in:
TJ DeVries
2020-10-08 10:32:25 -04:00
parent 01fa923f15
commit 50afbb706d

View File

@@ -631,8 +631,8 @@ end
function Picker:set_selection(row)
-- TODO: Loop around behavior?
-- TODO: Scrolling past max results
if row > self.max_results then
row = self.max_results
if row >= self.max_results then
row = self.max_results - 1
elseif row < 0 then
row = 0
end