Patch windows (#222)

This commit is contained in:
Federico Scodelaro
2021-03-09 16:12:10 -03:00
committed by GitHub
parent 411e3412d1
commit 31ef294d05
9 changed files with 73 additions and 23 deletions

View File

@@ -222,7 +222,10 @@ local root_folder_modifier = vim.g.nvim_tree_root_folder_modifier or ':~'
local function update_draw_data(tree, depth, markers)
if tree.cwd and tree.cwd ~= '/' then
local root_name = vim.fn.fnamemodify(tree.cwd, root_folder_modifier):gsub('/$', '').."/.."
local root_name = utils.path_join({
utils.path_remove_trailing(vim.fn.fnamemodify(tree.cwd, root_folder_modifier)),
".."
})
table.insert(lines, root_name)
table.insert(hl, {'NvimTreeRootFolder', index, 0, string.len(root_name)})
index = 1