mirror of
https://github.com/preservim/tagbar.git
synced 2024-11-23 10:41:49 +08:00
Prevent update error when current file is empty
This commit is contained in:
parent
f801147c2e
commit
4ca7a0c636
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user