diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index 254ce7b..f61a3da 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -4,8 +4,9 @@ let s:has_fugitive = exists('*fugitive#head') let s:has_fugitive_detect = exists('*fugitive#detect') let s:has_lawrencium = exists('*lawrencium#statusline') +let s:has_vcscommand = exists('*VCSCommandGetStatusLine') -if !s:has_fugitive && !s:has_lawrencium +if !s:has_fugitive && !s:has_lawrencium && !s:has_vcscommand finish endif @@ -31,6 +32,15 @@ function! airline#extensions#branch#get_head() endif endif + if empty(head) + if s:has_vcscommand + call VCSCommandEnableBufferSetup() + if exists('b:VCSCommandBufferInfo') + let head = get(b:VCSCommandBufferInfo, 0, '') + endif + endif + endif + return empty(head) || !s:check_in_path() \ ? s:empty_message \ : printf('%s%s', empty(s:symbol) ? '' : s:symbol.(g:airline_symbols.space), head)