mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-24 20:13:04 +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
|
||||
|
||||
function! s:config_fugitive_branch() abort
|
||||
let s:vcs_config['git'].branch = exists('*FugitiveHead') ?
|
||||
\ FugitiveHead(s:sha1size) : fugitive#head(s:sha1size)
|
||||
let s:vcs_config['git'].branch = FugitiveHead(s:sha1size)
|
||||
if s:vcs_config['git'].branch is# 'master' &&
|
||||
\ airline#util#winwidth() < 81
|
||||
" Shorten default a bit
|
||||
|
|
|
@ -144,7 +144,7 @@ endfunction
|
|||
|
||||
function! airline#util#has_fugitive()
|
||||
if !exists("s:has_fugitive")
|
||||
let s:has_fugitive = exists('*fugitive#head') || exists('*FugitiveHead')
|
||||
let s:has_fugitive = exists('*FugitiveHead')
|
||||
endif
|
||||
return s:has_fugitive
|
||||
endfunction
|
||||
|
|
Loading…
Reference in New Issue
Block a user