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.36k stars 175 forks source link

Check parent window is valid before setting active #291

Closed jgoguen closed 1 year ago

jgoguen commented 1 year ago

When exiting neovim with only one window open (besides trouble), there's no parent window to set active. This verifies that the parent window is valid before setting it active.

With this in place, neovim exits cleanly when trouble is the last window open. If there is another window, that window becomes active and neovim does not exit.

Fixes #284

folke commented 1 year ago

thanks!

xu-cheng commented 1 year ago

@jgoguen This doesn't fix the problem unfortunately. See https://github.com/folke/trouble.nvim/issues/284#issuecomment-1575275159