mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-18 03:50:26 +01:00
Fix statusline bug when opening Tagbar without having a valid file loaded
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user