mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 04:53:41 +08:00
fugitive: remove old fugitive test
As mentioned by @tpope, remove the old test for the autoloaded function fugitivie#head() and instead use consistently FugitiveHead() everywhere
This commit is contained in:
parent
c465570143
commit
5d7e656081
|
@ -97,8 +97,7 @@ function! s:update_git_branch()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:config_fugitive_branch() abort
|
function! s:config_fugitive_branch() abort
|
||||||
let s:vcs_config['git'].branch = exists('*FugitiveHead') ?
|
let s:vcs_config['git'].branch = FugitiveHead(s:sha1size)
|
||||||
\ FugitiveHead(s:sha1size) : fugitive#head(s:sha1size)
|
|
||||||
if s:vcs_config['git'].branch is# 'master' &&
|
if s:vcs_config['git'].branch is# 'master' &&
|
||||||
\ airline#util#winwidth() < 81
|
\ airline#util#winwidth() < 81
|
||||||
" Shorten default a bit
|
" Shorten default a bit
|
||||||
|
|
|
@ -144,7 +144,7 @@ endfunction
|
||||||
|
|
||||||
function! airline#util#has_fugitive()
|
function! airline#util#has_fugitive()
|
||||||
if !exists("s:has_fugitive")
|
if !exists("s:has_fugitive")
|
||||||
let s:has_fugitive = exists('*fugitive#head') || exists('*FugitiveHead')
|
let s:has_fugitive = exists('*FugitiveHead')
|
||||||
endif
|
endif
|
||||||
return s:has_fugitive
|
return s:has_fugitive
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in New Issue
Block a user