fix opening a file should change the tree base

This commit is contained in:
kiyan42 2020-05-18 20:01:19 +02:00
parent b1ee17e451
commit 5fcbc21edb

View File

@ -168,6 +168,13 @@ function M.check_buffer_and_open()
init_tree() init_tree()
M.toggle() M.toggle()
else
local new_path = get_cwd()
if new_path ~= '/' then
new_path = new_path .. '/'
end
set_root_path(new_path)
init_tree()
end end
end end