refactor: simplify opening file in new tab

fixes #1271. Also fixes opening a file in new tab when close_on_open was
true.

This introduces breaking change since we don't do any extra behavior
and let the buffer be opened by the tree.
The previous behavior was a bit old and i believe this should've been
fixed by now.
Reference this commit if unexpected behavior appears while opening files
in new tabs from nvim-tree.
This commit is contained in:
kiyan
2022-05-21 12:09:09 +02:00
parent 9d6f4c184b
commit 73ab312820
2 changed files with 1 additions and 27 deletions

View File

@@ -254,7 +254,7 @@ end
function M.is_visible(opts)
if opts and opts.any_tabpage then
for _, v in pairs(M.View.tabpages) do
if a.nvim_win_is_valid(v.winnr) then
if v.winnr and a.nvim_win_is_valid(v.winnr) then
return true
end
end