@@ -148,26 +148,6 @@ local function setup_autocommands(opts)
148148 vim .api .nvim_create_autocmd (name , vim .tbl_extend (" force" , default_opts , custom_opts ))
149149 end
150150
151- -- TODO #2826 move this to explorer
152- -- prevent new opened file from opening in the same window as nvim-tree
153- create_nvim_tree_autocmd (" BufWipeout" , {
154- pattern = " NvimTree_*" ,
155- callback = function ()
156- if not utils .is_nvim_tree_buf (0 ) then
157- return
158- end
159-
160- local explorer = core .get_explorer ()
161- if explorer then
162- if opts .actions .open_file .eject then
163- explorer .view :prevent_buffer_override ()
164- else
165- explorer .view :abandon_current_window ()
166- end
167- end
168- end ,
169- })
170-
171151 if opts .tab .sync .open then
172152 create_nvim_tree_autocmd (" TabEnter" , { callback = vim .schedule_wrap (M .tab_enter ) })
173153 end
@@ -229,21 +209,6 @@ local function setup_autocommands(opts)
229209 })
230210 end
231211
232- -- TODO #2826 move this to explorer
233- if opts .view .float .enable and opts .view .float .quit_on_focus_loss then
234- create_nvim_tree_autocmd (" WinLeave" , {
235- pattern = " NvimTree_*" ,
236- callback = function ()
237- if utils .is_nvim_tree_buf (0 ) then
238- local explorer = core .get_explorer ()
239- if explorer then
240- explorer .view :close ()
241- end
242- end
243- end ,
244- })
245- end
246-
247212 -- Handles event dispatch when tree is closed by `:q`
248213 create_nvim_tree_autocmd (" WinClosed" , {
249214 pattern = " *" ,
0 commit comments