File tree 2 files changed +14
-3
lines changed
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)
776
776
setup_vim_commands ()
777
777
end
778
778
779
- if M .setup_called and view . is_visible () then
779
+ if M .setup_called then
780
780
view .close_all_tabs ()
781
- view .abandon_current_window ()
781
+ view .abandon_all_windows ()
782
782
end
783
783
784
784
if M .setup_called and core .get_explorer () ~= nil then
Original file line number Diff line number Diff line change 326
326
function M .abandon_current_window ()
327
327
local tab = vim .api .nvim_get_current_tabpage ()
328
328
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
330
341
end
331
342
332
343
function M .is_visible (opts )
You can’t perform that action at this time.
0 commit comments