File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,6 @@ function M.tab_change()
133
133
end
134
134
end
135
135
136
- local function find_existing_windows ()
137
- return vim .tbl_filter (function (win )
138
- local buf = api .nvim_win_get_buf (win )
139
- return api .nvim_buf_get_name (buf ):match " NvimTree" ~= nil
140
- end , api .nvim_list_wins ())
141
- end
142
-
143
136
local function is_file_readable (fname )
144
137
local stat = luv .fs_stat (fname )
145
138
return stat and stat .type == " file" and luv .fs_access (fname , " R" )
@@ -258,13 +251,7 @@ function M.on_enter(netrw_disabled)
258
251
end
259
252
end
260
253
261
- -- Session that left a NvimTree Buffer opened, reopen with it
262
- local existing_tree_wins = find_existing_windows ()
263
- if existing_tree_wins [1 ] then
264
- api .nvim_set_current_win (existing_tree_wins [1 ])
265
- end
266
-
267
- if should_open or existing_tree_wins [1 ] ~= nil then
254
+ if should_open then
268
255
lib .open (cwd )
269
256
270
257
if should_focus_other_window then
You can’t perform that action at this time.
0 commit comments