refacto: remove rendering from lib.init

This commit is contained in:
kiyan
2022-02-20 23:01:25 +01:00
parent 9008bac180
commit 58b81ed9e6
3 changed files with 11 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ function M.toggle(find_file, no_focus)
else
local previous_buf = api.nvim_get_current_buf()
M.open()
if TreeExplorer and (_config.update_focused_file.enable or find_file) then
if _config.update_focused_file.enable or find_file then
M.find_file(false, previous_buf)
end
if no_focus then
@@ -200,7 +200,8 @@ function M.on_enter(netrw_disabled)
end
if should_open or should_hijack or existing_tree_wins[1] ~= nil then
lib.init(true, cwd)
lib.init(cwd)
lib.open()
end
M.initialized = true
end