fix: 'cd ..' going above the main dir of project
This commit is contained in:
parent
97785a38ae
commit
52d1d7e401
@ -13,7 +13,6 @@ local M = {
|
||||
BUF_NAME = 'LuaTree'
|
||||
}
|
||||
|
||||
|
||||
function M.get_buf()
|
||||
local regex = '.*'..M.BUF_NAME..'$';
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user