Merge pull request #1759 from tpope/fugitive-path
Fixes for fugitiveline
This commit is contained in:
commit
db45cdd994
@ -18,9 +18,13 @@ function! airline#extensions#fugitiveline#bufname()
|
|||||||
if !exists('b:fugitive_name')
|
if !exists('b:fugitive_name')
|
||||||
let b:fugitive_name = ''
|
let b:fugitive_name = ''
|
||||||
try
|
try
|
||||||
let buffer = fugitive#buffer()
|
if bufname('%') =~? '^fugitive:' && exists('*FugitivePath')
|
||||||
if buffer.type('blob')
|
let b:fugitive_name = FugitivePath()
|
||||||
let b:fugitive_name = buffer.repo().translate(buffer.path())
|
elseif exists('b:git_dir')
|
||||||
|
let buffer = fugitive#buffer()
|
||||||
|
if buffer.type('blob')
|
||||||
|
let b:fugitive_name = buffer.repo().translate(buffer.path('/'))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
|
Loading…
Reference in New Issue
Block a user