Use FugitivePath in fugitiveline if available
This commit is contained in:
parent
66e49d9a15
commit
9bee0e923e
@ -18,10 +18,14 @@ function! airline#extensions#fugitiveline#bufname()
|
||||
if !exists('b:fugitive_name')
|
||||
let b:fugitive_name = ''
|
||||
try
|
||||
if bufname('%') =~? '^fugitive:' && exists('*FugitivePath')
|
||||
let b:fugitive_name = FugitivePath()
|
||||
elseif exists('b:git_dir')
|
||||
let buffer = fugitive#buffer()
|
||||
if buffer.type('blob')
|
||||
let b:fugitive_name = buffer.repo().translate(buffer.path('/'))
|
||||
endif
|
||||
endif
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user