nvim-tree/nvim-tree.lua

Live filter triggers error in function 'calculate_overlay_win_width'

Closed this issue · 3 comments

Description

When launching the live filter by pressing 'f', the following error apperas:

Error executing vim.schedule lua callback: ...art/nvim-tree.lua/lua/nvim-tree/explorer/live-filter.lua:164: attempt to call method 'get_winnr' (a nil value)
stack traceback:
        ...art/nvim-tree.lua/lua/nvim-tree/explorer/live-filter.lua:164: in function 'calculate_overlay_win_width'
        ...art/nvim-tree.lua/lua/nvim-tree/explorer/live-filter.lua:188: in function <...art/nvim-tree.lua/lua/nvim-tree/explorer/live-filter.lua:173>

After that, the filter prompt is visible but can not be used.

Neovim version

NVIM v0.11.3
Build type: Release
LuaJIT 2.1.1753364724

Operating system and version

MacOS 15.6

Windows variant

No response

nvim-tree version

65bae44

Clean room replication

Sorry, just reading now about nvt-min.lua, but I already tested with a truly minimal configuration:

├── init.lua
└── pack
    └── nvim-tree
        └── start
            └── nvim-tree.lua

init.lua:

require("nvim-tree").setup()

Steps to reproduce

  1. mkdir -p ~/.config/nvim/pack/nvim-tree/start; cd $_
  2. git clone https://github.com/nvim-tree/nvim-tree.lua.git
  3. echo 'require("nvim-tree").setup()' >> ~/.config/nvim/init.lua
  4. open nvim and run :NvimTreeOpen
  5. press 'f'

Expected behavior

No response

Actual behavior

Image

Replicated, many thanks for raising.

Fixed and merged to master.

Please advise if this fixes the problem.

Thank you!! Yes it works now