Skip to content

Commit 4394cc7

Browse files
committed
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)
1 parent b0b4955 commit 4394cc7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/nvim-tree/actions/node/open-file.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local lib = require("nvim-tree.lib")
33
local notify = require("nvim-tree.notify")
44
local utils = require("nvim-tree.utils")
55
local core = require("nvim-tree.core")
6+
local full_name = require("nvim-tree.renderer.components.full-name")
67

78
local M = {}
89

@@ -40,7 +41,12 @@ local function usable_win_ids()
4041
end
4142

4243
local win_config = vim.api.nvim_win_get_config(id)
43-
return id ~= tree_winid and win_config.focusable and not win_config.hide and not win_config.external or false
44+
return id ~= tree_winid
45+
and id ~= full_name.popup_win
46+
and win_config.focusable
47+
and not win_config.hide
48+
and not win_config.external
49+
or false
4450
end, win_ids)
4551
end
4652

0 commit comments

Comments
 (0)