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
|
ROOT_PATH = path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.get_root_path()
|
||||||
|
return ROOT_PATH
|
||||||
|
end
|
||||||
|
|
||||||
local Tree = {}
|
local Tree = {}
|
||||||
|
|
||||||
local IGNORE_LIST = ""
|
local IGNORE_LIST = ""
|
||||||
|
|||||||
@@ -158,6 +158,9 @@ function M.navigate_to_buffer_dir(bufname)
|
|||||||
if new_path ~= '/' then
|
if new_path ~= '/' then
|
||||||
new_path = new_path .. '/'
|
new_path = new_path .. '/'
|
||||||
end
|
end
|
||||||
|
if new_path == state.get_root_path() then
|
||||||
|
return
|
||||||
|
end
|
||||||
set_root_path(new_path)
|
set_root_path(new_path)
|
||||||
init_tree()
|
init_tree()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user