From 50afbb706d2863647218f5ebe669677f57c8071f Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Thu, 8 Oct 2020 10:32:25 -0400 Subject: [PATCH] fix: Scrolls past bottom line --- lua/telescope/pickers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index d05bd42..d730ba5 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -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