romgrk / barbar.nvim

The neovim tabline plugin.
2.26k stars 85 forks source link

Closing neo-tree window with `:q` throws error in `WinScrolled` autocomd #502

Closed 03juan closed 1 year ago

03juan commented 1 year ago

Preamble (you can delete this section):

Description

Using the recommended setup option for sidebar_filetypes, closing and toggling neo-tree with its commands works perfectly fine as it indeed sends the BufWipeout event.

However, closing its window with :q sends a BufWinLeave event and so the WinScdolled autocmd is not deleted.

To Reproduce

barbar.setup {
  sidebar_filetypes = {
    ['neo-tree'] = { event = 'BufWipeout' },
}

Steps to reproduce the behavior:

  1. Go to neo-tree window
  2. Close with :q
  3. See error image

Screenshots Here I demo first toggling the window then quitting it, which throws the error.

https://github.com/romgrk/barbar.nvim/assets/4416345/bdcd31c3-0554-4d13-8541-35f8260cee3a

Informations Neovim version: 0.9.0