diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 3f8ad86..408c03e 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -3364,7 +3364,11 @@ function! s:QuitIfOnlyWindow() abort if tabpagenr('$') == 1 " Before quitting Vim, delete the tagbar buffer so that " the '0 mark is correctly set to the previous buffer. - bdelete + " Also disable autocmd on this command to avoid unnecessary + " autocmd nesting. + if winnr('$') == 1 + noautocmd bdelete + endif quit else close