fugitiveline: use correct fugitive functions
This commit is contained in:
parent
3ac318bfd3
commit
28bebd35ea
@ -17,7 +17,11 @@ function! airline#extensions#fugitiveline#bufname()
|
|||||||
try
|
try
|
||||||
if bufname('%') =~? '^fugitive:' && exists('*FugitiveReal')
|
if bufname('%') =~? '^fugitive:' && exists('*FugitiveReal')
|
||||||
let b:fugitive_name = FugitiveReal(bufname('%'))
|
let b:fugitive_name = FugitiveReal(bufname('%'))
|
||||||
elseif exists('b:git_dir')
|
elseif exists('b:git_dir') && exists('*fugitive#repo')
|
||||||
|
if get(b:, 'fugitive_type', '') is# 'blob'
|
||||||
|
let b:fugitive_name = fugitive#repo().translate(FugitivePath(@%, ''))
|
||||||
|
endif
|
||||||
|
elseif exists('b:git_dir') && !exists('*fugitive#repo')
|
||||||
let buffer = fugitive#buffer()
|
let buffer = fugitive#buffer()
|
||||||
if buffer.type('blob')
|
if buffer.type('blob')
|
||||||
let b:fugitive_name = buffer.repo().translate(buffer.path('/'))
|
let b:fugitive_name = buffer.repo().translate(buffer.path('/'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user