From 2dc75704b773bc9e00a59b12afb98d3960c9f25b Mon Sep 17 00:00:00 2001 From: koopa1338 Date: Sat, 9 Oct 2021 09:06:52 +0200 Subject: [PATCH] fix: scroll_strategy limit (#1320) --- lua/telescope/pickers/scroller.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/pickers/scroller.lua b/lua/telescope/pickers/scroller.lua index 814ac74..38882b1 100644 --- a/lua/telescope/pickers/scroller.lua +++ b/lua/telescope/pickers/scroller.lua @@ -29,7 +29,7 @@ local scroll_calculators = { return function(max_results, num_results, row) local start, finish = range_fn(max_results, num_results) - if row >= finish then + if row >= finish and finish > 0 then return finish - 1 elseif row < start then return start