folke / trouble.nvim

🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.
Apache License 2.0
5.12k stars 172 forks source link

bug v3: Preview goes on inifinite error loop if buffer is deleted while symbols / definitions are open. #426

Closed arieldd closed 1 month ago

arieldd commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.10.0-dev-3116+gc1396afa7

Operating system/version

WSL - Ubuntu 22

Describe the bug

When closing a buffer via buffer delete (:bd) when either LSP symbols or definitions window is open, Preview keeps trying to index a null value and goes on an infinite error loop.

image

Steps To Reproduce

1- Open any file with LSP symbols support 2- Toggle LSP Symbols window 3- Close buffer with :bd 4- If it does not trigger on first try, navigate to one of the symbols and try again.

Expected Behavior

Either symbols / definitions windows close with the buffer or they stay open without errors.

arieldd commented 1 month ago

This can also be triggered when attempting to open Symbols window when no buffer is open, e.g. from an Alpha Dashboard. image