diff --git a/lua/avante/config.lua b/lua/avante/config.lua index c6836ca..c61cd33 100644 --- a/lua/avante/config.lua +++ b/lua/avante/config.lua @@ -627,6 +627,9 @@ M._defaults = { prefix = "> ", height = 8, -- Height of the input window in vertical layout }, + selected_files = { + height = 6, -- Maximum height of the selected files window + }, edit = { border = { " ", " ", " ", " ", " ", " ", " ", " " }, start_insert = true, -- Start insert mode when opening the edit window diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index 70aac21..b7a94fc 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -2963,7 +2963,7 @@ end function Sidebar:get_selected_files_container_height() local selected_filepaths_ = self.file_selector:get_selected_filepaths() - return math.min(vim.o.lines - 2, #selected_filepaths_ + 1) + return math.min(Config.windows.selected_files.height, #selected_filepaths_ + 1) end function Sidebar:adjust_selected_files_container_layout()