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

This commit is contained in:
Jan Larres committed 2011-04-09 03:33:59 +12:00
1 parent 3e4bd07b48
commit 4d5b30b1ce
1 file changed
+4 -2
+4 -2
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