mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-26 02:09:48 +08:00
fugitiveline: use correct fugitive functions
This commit is contained in:
parent
3ac318bfd3
commit
28bebd35ea
|
@ -17,7 +17,11 @@ function! airline#extensions#fugitiveline#bufname()
|
|||
try
|
||||
if bufname('%') =~? '^fugitive:' && exists('*FugitiveReal')
|
||||
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()
|
||||
if buffer.type('blob')
|
||||
let b:fugitive_name = buffer.repo().translate(buffer.path('/'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user