Add config to limit max height for selected files (#2618)
This commit is contained in:
@@ -627,6 +627,9 @@ M._defaults = {
|
|||||||
prefix = "> ",
|
prefix = "> ",
|
||||||
height = 8, -- Height of the input window in vertical layout
|
height = 8, -- Height of the input window in vertical layout
|
||||||
},
|
},
|
||||||
|
selected_files = {
|
||||||
|
height = 6, -- Maximum height of the selected files window
|
||||||
|
},
|
||||||
edit = {
|
edit = {
|
||||||
border = { " ", " ", " ", " ", " ", " ", " ", " " },
|
border = { " ", " ", " ", " ", " ", " ", " ", " " },
|
||||||
start_insert = true, -- Start insert mode when opening the edit window
|
start_insert = true, -- Start insert mode when opening the edit window
|
||||||
|
|||||||
@@ -2963,7 +2963,7 @@ end
|
|||||||
|
|
||||||
function Sidebar:get_selected_files_container_height()
|
function Sidebar:get_selected_files_container_height()
|
||||||
local selected_filepaths_ = self.file_selector:get_selected_filepaths()
|
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
|
end
|
||||||
|
|
||||||
function Sidebar:adjust_selected_files_container_layout()
|
function Sidebar:adjust_selected_files_container_layout()
|
||||||
|
|||||||
Reference in New Issue
Block a user