Add config to limit max height for selected files (#2618)

This commit is contained in:
Ahmed Siddiqui
2025-08-19 03:39:08 -04:00
committed by GitHub
parent 24f7dbbe76
commit 212797a2f2
2 changed files with 4 additions and 1 deletions

View File

@@ -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

View File

@@ -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()