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: error when quitting vim with trouble window open #439

Closed santhosh-tekuri closed 1 month ago

santhosh-tekuri commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.11

Operating system/version

MacOS Sonoma

Describe the bug

quitting Nvim with trouble window open gives error

Steps To Reproduce

  1. open trouble diagnostics window
  2. make sure some buffer has focus. i.e trouble window is not in focus
  3. type :q and following error appears
Error detected while processing BufEnter Autocommands for "<buffer=7>":
E5108: Error executing lua ....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:357: Vim:E444: Cannot close last window
stack traceback:
        [C]: in function 'nvim_win_close'
        ....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:357: in function 'on_enter'
        ....local/share/nvim/lazy/trouble.nvim/lua/trouble/init.lua:215: in function 'action'
        [string ":lua"]:1: in main chunk

Expected Behavior

Nvim should quit normally

Repro

No response

folke commented 1 month ago

The main branch is no longer maintained. All new development happens on the dev branch which will become main at some point.