We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89816ac commit b657405Copy full SHA for b657405
lua/nvim-tree/actions/node/open-file.lua
@@ -237,10 +237,11 @@ local function open_in_new_window(filename, mode)
237
return
238
end
239
240
- -- non-floating windows
+ -- non-floating, non-nvim-tree windows
241
local win_ids = vim.tbl_filter(function(id)
242
local config = vim.api.nvim_win_get_config(id)
243
- return config and config.relative == ""
+ local bufnr = vim.api.nvim_win_get_buf(id)
244
+ return config and config.relative == "" or utils.is_nvim_tree_buf(bufnr)
245
end, vim.api.nvim_list_wins())
246
247
local create_new_window = #win_ids == 1 -- This implies that the nvim-tree window is the only one
0 commit comments