feat: add hide_root_folder (#728)

This commit is contained in:
M.A
2021-10-24 17:48:57 +03:00
committed by GitHub
parent 6cadd3a9d7
commit fd3969ec98
6 changed files with 18 additions and 4 deletions

View File

@@ -266,7 +266,9 @@ local function update_draw_data(tree, depth, markers)
["readme.md"] = true,
}
if tree.cwd and tree.cwd ~= '/' then
local hide_root_folder = view.View.hide_root_folder
if tree.cwd and tree.cwd ~= '/' and not hide_root_folder then
local root_name = utils.path_join({
utils.path_remove_trailing(vim.fn.fnamemodify(tree.cwd, root_folder_modifier)),
".."