fix: 'cd ..' going above the main dir of project

This commit is contained in:
kiyan42
2020-05-14 16:35:06 +02:00
parent 97785a38ae
commit 52d1d7e401
2 changed files with 1 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ function M.open_file(open_type)
local node = tree[tree_index]
if node.name == '..' then
api.nvim_command('cd ..')
api.nvim_command('cd '..node.path..'/..')
local new_path = get_cwd()
if new_path ~= '/' then