File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -794,20 +794,19 @@ function M.setup(conf)
794
794
end
795
795
796
796
setup_autocommands (opts )
797
- require (" nvim-tree.watcher" ).purge_watchers ()
798
797
799
798
if not M .setup_called then
799
+ -- first call to setup
800
800
setup_vim_commands ()
801
- end
802
-
803
- if M . setup_called then
801
+ else
802
+ -- subsequent calls to setup
803
+ require ( " nvim-tree.watcher " ). purge_watchers ()
804
804
view .close_all_tabs ()
805
805
view .abandon_all_windows ()
806
- end
807
-
808
- if M .setup_called and core .get_explorer () ~= nil then
809
- git .purge_state ()
810
- TreeExplorer = nil
806
+ if core .get_explorer () ~= nil then
807
+ git .purge_state ()
808
+ TreeExplorer = nil
809
+ end
811
810
end
812
811
813
812
M .setup_called = true
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ function M.load_project_status(cwd)
173
173
end
174
174
175
175
function M .purge_state ()
176
+ log .line (" git" , " purge_state" )
176
177
M .projects = {}
177
178
M .cwd_to_project_root = {}
178
179
end
You can’t perform that action at this time.
0 commit comments