Print message if no tags have been found in file

This commit is contained in:
Jan Larres 2013-08-24 17:57:33 +12:00
parent a566f7141f
commit dab8d99fb8

View File

@ -2541,8 +2541,17 @@ function! s:RenderContent(...) abort
let typeinfo = fileinfo.typeinfo
" Print tags
call s:PrintKinds(typeinfo, fileinfo)
if !empty(fileinfo.tags)
" Print tags
call s:PrintKinds(typeinfo, fileinfo)
else
call s:LogDebugMessage('No tags found, skipping printing.')
if g:tagbar_compact && s:short_help
silent 0put ='\" No tags found.'
else
silent put ='\" No tags found.'
endif
endif
" Delete empty lines at the end of the buffer
for linenr in range(line('$'), 1, -1)