mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-26 10:13:42 +08:00
fugitive: Use FugitiveHead() instead of fugitive#head
function if possible and use it instead of the fugitive#head (which will always autload the fugitive plugin).
This commit is contained in:
parent
a1680cc36d
commit
981b83003f
|
@ -86,7 +86,8 @@ function! s:update_git_branch()
|
|||
return
|
||||
endif
|
||||
|
||||
let s:vcs_config['git'].branch = fugitive#head(s:sha1size)
|
||||
let s:vcs_config['git'].branch = exists("*FugitiveHead") ?
|
||||
\ FugitiveHead(s:sha1size) : fugitive#head(s:sha1size)
|
||||
if s:vcs_config['git'].branch is# 'master' && winwidth(0) < 81
|
||||
" Shorten default a bit
|
||||
let s:vcs_config['git'].branch='mas'
|
||||
|
|
|
@ -105,7 +105,7 @@ function! airline#util#ignore_buf(name)
|
|||
endfunction
|
||||
|
||||
function! airline#util#has_fugitive()
|
||||
return exists('*fugitive#head') || exists('*FugitiveStatusline')
|
||||
return exists('*fugitive#head') || exists('*FugitiveHead')
|
||||
endfunction
|
||||
|
||||
function! airline#util#has_lawrencium()
|
||||
|
|
Loading…
Reference in New Issue
Block a user