Environment
- Operating System: Linux Debian Bookworm
- Vim/Neovim version
:version: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 04 2023 10:24:44)
- NERDTree version, found on first line of quickhelp
?: 7.0.1 (9ec27d4)
- Are you using any of these NERDTree-dependent plugins?
Nope, I removed all plugins.
- Provide a minimal .vimrc file that will reproduce the issue.
" Close the tab if NERDTree is the only window remaining in it.
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
Steps to Reproduce the Issue
Open a file, open NERDTree, open another file, open NERDTree, close a file.
Current Behavior (Include screenshots where appropriate.)
I get this error message
Error detected while processing BufEnter Autocommands for "*":
Press ENTER or type command to continue
and NERDTree is still open.
Expected Result
Tab closes.
This reminds me of jistr/vim-nerdtree-tabs#102.
I'm trying to get rid of vim-nerdtree-tabs because it is unmaintained and because I realized what I'm using it for should be achievable using the sample config lines from NERDTree README.
I'm surprised I'm getting that same error.
I removed all plugins and kept that single line in the config file, which makes me wonder how come no one else is affected. I don't see anything specific in my setup.