Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to not reverse select_next_item on bottom_up list (#1346) #1711

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/cmp/view/custom_entries_view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ end
custom_entries_view.select_next_item = function(self, option)
if self:visible() then
local cursor = vim.api.nvim_win_get_cursor(self.entries_win.win)[1]
local is_top_down = self:is_direction_top_down()
local is_top_down = self:is_direction_top_down() or option.preserve_mapping_verticality
local last = #self.entries

if not self.entries_win:option('cursorline') then
Expand Down Expand Up @@ -322,7 +322,7 @@ end
custom_entries_view.select_prev_item = function(self, option)
if self:visible() then
local cursor = vim.api.nvim_win_get_cursor(self.entries_win.win)[1]
local is_top_down = self:is_direction_top_down()
local is_top_down = self:is_direction_top_down() or option.preserve_mapping_verticality
local last = #self.entries

if not self.entries_win:option('cursorline') then
Expand Down