1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-18 12:00:23 +01:00

Fix statusline bug when opening Tagbar without having a valid file loaded

This commit is contained in:
Jan Larres
2011-04-09 03:33:59 +12:00
parent 3e4bd07b48
commit 4d5b30b1ce

View File

@@ -2435,8 +2435,10 @@ function! TagbarGenerateStatusline()
let text = '[Order]'
endif
let filename = fnamemodify(s:known_files.getCurrent().fpath, ':t')
let text .= ' ' . filename
if !empty(s:known_files.getCurrent())
let filename = fnamemodify(s:known_files.getCurrent().fpath, ':t')
let text .= ' ' . filename
endif
return text
endfunction