fix: missing check for negative index in cycle scrolling (#1372)

This commit is contained in:
Vsevolod
2021-10-24 17:01:18 +03:00
committed by GitHub
parent f31ef36293
commit 782d802d44

View File

@@ -18,7 +18,7 @@ local scroll_calculators = {
if row >= finish then if row >= finish then
return start return start
elseif row < start then elseif row < start then
return finish - 1 return (finish - 1 < 0) and finish or finish - 1
end end
return row return row