We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 498e879 commit 89816acCopy full SHA for 89816ac
lua/nvim-tree/actions/node/open-file.lua
@@ -237,7 +237,12 @@ local function open_in_new_window(filename, mode)
237
return
238
end
239
240
- local win_ids = vim.api.nvim_list_wins()
+ -- non-floating 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 == ""
244
+ end, vim.api.nvim_list_wins())
245
+
246
local create_new_window = #win_ids == 1 -- This implies that the nvim-tree window is the only one
247
local new_window_side = (view.View.side == "right") and "aboveleft" or "belowright"
248
0 commit comments