fix init_tree should not run when root path doesnt change

This commit is contained in:
kiyan42
2020-05-18 23:56:56 +02:00
parent ab258d96f6
commit e1fbabf879
2 changed files with 7 additions and 0 deletions

View File

@@ -11,6 +11,10 @@ function M.set_root_path(path)
ROOT_PATH = path
end
function M.get_root_path()
return ROOT_PATH
end
local Tree = {}
local IGNORE_LIST = ""

View File

@@ -158,6 +158,9 @@ function M.navigate_to_buffer_dir(bufname)
if new_path ~= '/' then
new_path = new_path .. '/'
end
if new_path == state.get_root_path() then
return
end
set_root_path(new_path)
init_tree()
end