From 9bb8ee6e2d6ab3c8cc53323b79f05886bc722faa Mon Sep 17 00:00:00 2001 From: sanka047 <50463858+sanka047@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:04:41 -0500 Subject: [PATCH] fix(custom_entries_view): remove off-by-one error with bottom_up selection order (#1261) Closes #1260 --- lua/cmp/view/custom_entries_view.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cmp/view/custom_entries_view.lua b/lua/cmp/view/custom_entries_view.lua index 54dd5a9..ae6cb40 100644 --- a/lua/cmp/view/custom_entries_view.lua +++ b/lua/cmp/view/custom_entries_view.lua @@ -213,7 +213,7 @@ custom_entries_view.open = function(self, offset, entries) if self:is_direction_top_down() then self:_select(1, { behavior = types.cmp.SelectBehavior.Select }) else - self:_select(#self.entries - 1, { behavior = types.cmp.SelectBehavior.Select }) + self:_select(#self.entries, { behavior = types.cmp.SelectBehavior.Select }) end else if self:is_direction_top_down() then