fix: scroll_strategy limit (#1320)

This commit is contained in:
koopa1338
2021-10-09 09:06:52 +02:00
committed by GitHub
parent dea927d0eb
commit 2dc75704b7

View File

@@ -29,7 +29,7 @@ local scroll_calculators = {
return function(max_results, num_results, row) return function(max_results, num_results, row)
local start, finish = range_fn(max_results, num_results) local start, finish = range_fn(max_results, num_results)
if row >= finish then if row >= finish and finish > 0 then
return finish - 1 return finish - 1
elseif row < start then elseif row < start then
return start return start