diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 92a363c..d581c48 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -3111,7 +3111,8 @@ function! s:AutoUpdate(fname, force) abort " Display the tagbar content if the tags have been updated or a different " file is being displayed if bufwinnr('__Tagbar__') != -1 && - \ (s:new_window || updated || a:fname != s:known_files.getCurrent().fpath) + \ (s:new_window || updated || + \ (!empty(s:known_files.getCurrent()) && a:fname != s:known_files.getCurrent().fpath)) call s:RenderContent(fileinfo) endif