fix init_tree should not run when root path doesnt change
This commit is contained in:
@@ -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 = ""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user