From b6669c7c9de542c53f2d19a806abb7610e9ef813 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp <40647401+mvanderkamp@users.noreply.github.com> Date: Mon, 27 Sep 2021 22:08:51 -0600 Subject: [PATCH] Clear old TagbarCleanupAutoCmds before redefining (#791) --- autoload/tagbar.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 3ee4b92..9748f04 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -597,6 +597,8 @@ function! s:CreateAutocommands() abort " Separate these autocmds out from the others as we want to always perform " these actions even if the tagbar window closes. augroup TagbarCleanupAutoCmds + autocmd! + if !g:tagbar_no_autocmds autocmd BufDelete,BufWipeout * \ nested call s:HandleBufDelete(expand(''), expand(''))