From 4394cc782f5011ba76532bc4af7eb8666f33508f Mon Sep 17 00:00:00 2001 From: przepompownia Date: Tue, 15 Jul 2025 02:04:19 +0200 Subject: [PATCH] fix(picker): exclude full_name window id from the choice Problem: `full_name` window from is considered as usable by picker Solution: exclude its ID (also true for nil values) --- lua/nvim-tree/actions/node/open-file.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/nvim-tree/actions/node/open-file.lua b/lua/nvim-tree/actions/node/open-file.lua index dedd61229e5..f59ceb6f249 100644 --- a/lua/nvim-tree/actions/node/open-file.lua +++ b/lua/nvim-tree/actions/node/open-file.lua @@ -3,6 +3,7 @@ local lib = require("nvim-tree.lib") local notify = require("nvim-tree.notify") local utils = require("nvim-tree.utils") local core = require("nvim-tree.core") +local full_name = require("nvim-tree.renderer.components.full-name") local M = {} @@ -40,7 +41,12 @@ local function usable_win_ids() end local win_config = vim.api.nvim_win_get_config(id) - return id ~= tree_winid and win_config.focusable and not win_config.hide and not win_config.external or false + return id ~= tree_winid + and id ~= full_name.popup_win + and win_config.focusable + and not win_config.hide + and not win_config.external + or false end, win_ids) end