summaryrefslogtreecommitdiff
path: root/lua/telescope/pickers.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-10-08 10:32:25 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-10-08 10:32:25 -0400
commit50afbb706d2863647218f5ebe669677f57c8071f (patch)
tree3558b05bcb8cd554cee86928811a9e79f1ceb410 /lua/telescope/pickers.lua
parent01fa923f1532e3030c34427452b9d09733b9e8d9 (diff)
fix: Scrolls past bottom line
Diffstat (limited to 'lua/telescope/pickers.lua')
-rw-r--r--lua/telescope/pickers.lua4
1 files 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