Prevent update error when current file is empty

This commit is contained in:
Jan Larres 2013-02-18 21:51:16 +13:00
parent f801147c2e
commit 4ca7a0c636

View File

@ -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