@@ -23,7 +23,7 @@ local function usable_win_ids()
2323 local explorer = core .get_explorer ()
2424 local tabpage = vim .api .nvim_get_current_tabpage ()
2525 local win_ids = vim .api .nvim_tabpage_list_wins (tabpage )
26- local tree_winid = explorer and explorer .view :get_winnr (tabpage , " open-file.usable_win_ids " )
26+ local tree_winid = explorer and explorer .view :get_winid (tabpage )
2727
2828 return vim .tbl_filter (function (id )
2929 local bufid = vim .api .nvim_win_get_buf (id )
@@ -196,7 +196,7 @@ local function open_file_in_tab(filename)
196196 if M .quit_on_open then
197197 local explorer = core .get_explorer ()
198198 if explorer then
199- explorer .view :close (nil , " open-file.open_file_in_tab " )
199+ explorer .view :close ()
200200 end
201201 end
202202 if M .relative_path then
@@ -209,7 +209,7 @@ local function drop(filename)
209209 if M .quit_on_open then
210210 local explorer = core .get_explorer ()
211211 if explorer then
212- explorer .view :close (nil , " open-file.drop " )
212+ explorer .view :close ()
213213 end
214214 end
215215 if M .relative_path then
@@ -222,7 +222,7 @@ local function tab_drop(filename)
222222 if M .quit_on_open then
223223 local explorer = core .get_explorer ()
224224 if explorer then
225- explorer .view :close (nil , " open-file.tab_drop " )
225+ explorer .view :close ()
226226 end
227227 end
228228 if M .relative_path then
@@ -352,7 +352,7 @@ local function open_in_new_window(filename, mode)
352352 end
353353 end
354354
355- if (mode == " preview" or mode == " preview_no_picker" ) and explorer and explorer .view .float .enable then
355+ if (mode == " preview" or mode == " preview_no_picker" ) and explorer and explorer .opts . view .float .enable then
356356 -- ignore "WinLeave" autocmd on preview
357357 -- because the registered "WinLeave"
358358 -- will kill the floating window immediately
@@ -453,7 +453,7 @@ function M.fn(mode, filename)
453453 end
454454
455455 if M .quit_on_open and explorer then
456- explorer .view :close (nil , " open-file.fn " )
456+ explorer .view :close ()
457457 end
458458end
459459
0 commit comments