@@ -23,7 +23,7 @@ local function usable_win_ids()
23
23
local explorer = core .get_explorer ()
24
24
local tabpage = vim .api .nvim_get_current_tabpage ()
25
25
local win_ids = vim .api .nvim_tabpage_list_wins (tabpage )
26
- local tree_winid = explorer and explorer .view :get_winid (tabpage )
26
+ local tree_winid = explorer and explorer .view :get_winnr (tabpage , " open-file.usable_win_ids " )
27
27
28
28
return vim .tbl_filter (function (id )
29
29
local bufid = vim .api .nvim_win_get_buf (id )
@@ -196,7 +196,7 @@ local function open_file_in_tab(filename)
196
196
if M .quit_on_open then
197
197
local explorer = core .get_explorer ()
198
198
if explorer then
199
- explorer .view :close ()
199
+ explorer .view :close (nil , " open-file.open_file_in_tab " )
200
200
end
201
201
end
202
202
if M .relative_path then
@@ -209,7 +209,7 @@ local function drop(filename)
209
209
if M .quit_on_open then
210
210
local explorer = core .get_explorer ()
211
211
if explorer then
212
- explorer .view :close ()
212
+ explorer .view :close (nil , " open-file.drop " )
213
213
end
214
214
end
215
215
if M .relative_path then
@@ -222,7 +222,7 @@ local function tab_drop(filename)
222
222
if M .quit_on_open then
223
223
local explorer = core .get_explorer ()
224
224
if explorer then
225
- explorer .view :close ()
225
+ explorer .view :close (nil , " open-file.tab_drop " )
226
226
end
227
227
end
228
228
if M .relative_path then
@@ -352,7 +352,7 @@ local function open_in_new_window(filename, mode)
352
352
end
353
353
end
354
354
355
- if (mode == " preview" or mode == " preview_no_picker" ) and explorer and explorer .opts . view .float .enable then
355
+ if (mode == " preview" or mode == " preview_no_picker" ) and explorer and explorer .view .float .enable then
356
356
-- ignore "WinLeave" autocmd on preview
357
357
-- because the registered "WinLeave"
358
358
-- will kill the floating window immediately
@@ -453,7 +453,7 @@ function M.fn(mode, filename)
453
453
end
454
454
455
455
if M .quit_on_open and explorer then
456
- explorer .view :close ()
456
+ explorer .view :close (nil , " open-file.fn " )
457
457
end
458
458
end
459
459
0 commit comments