File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -776,9 +776,9 @@ function M.setup(conf)
776776 setup_vim_commands ()
777777 end
778778
779- if M .setup_called and view . is_visible () then
779+ if M .setup_called then
780780 view .close_all_tabs ()
781- view .abandon_current_window ()
781+ view .abandon_all_windows ()
782782 end
783783
784784 if M .setup_called and core .get_explorer () ~= nil then
Original file line number Diff line number Diff line change 326326function M .abandon_current_window ()
327327 local tab = vim .api .nvim_get_current_tabpage ()
328328 BUFNR_PER_TAB [tab ] = nil
329- M .View .tabpages [tab ].winnr = nil
329+ if M .View .tabpages [tab ] then
330+ M .View .tabpages [tab ].winnr = nil
331+ end
332+ end
333+
334+ function M .abandon_all_windows ()
335+ for tab , _ in pairs (vim .api .nvim_list_tabpages ()) do
336+ BUFNR_PER_TAB [tab ] = nil
337+ if M .View .tabpages [tab ] then
338+ M .View .tabpages [tab ].winnr = nil
339+ end
340+ end
330341end
331342
332343function M .is_visible (opts )
You can’t perform that action at this time.
0 commit comments