mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Prevent update error when current file is empty
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user