fix missing part of commit 3bd6cb5ee4

There was a part missing of #3bd6cb5ee4981227
add it back
This commit is contained in:
Christian Brabandt 2016-11-03 17:41:55 +01:00
parent 6dae3452db
commit 02ecb8631d

View File

@ -148,7 +148,6 @@ if s:has_async
else else
let cmd = ['sh', '-c', a:config['cmd'] . shellescape(a:file)] let cmd = ['sh', '-c', a:config['cmd'] . shellescape(a:file)]
endif endif
let cmdstring = split(a:cmd)[0]
let options = {'config': a:config, 'buf': '', 'file': a:file} let options = {'config': a:config, 'buf': '', 'file': a:file}
if has_key(s:jobs, a:file) if has_key(s:jobs, a:file)
@ -211,7 +210,6 @@ function! airline#extensions#branch#head()
let b:airline_head = '' let b:airline_head = ''
let l:vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"]) let l:vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"])
let found_fugitive_head = 0
let l:heads = {} let l:heads = {}
for vcs in l:vcs_priority for vcs in l:vcs_priority
@ -229,15 +227,12 @@ function! airline#extensions#branch#head()
if !empty(b:airline_head) if !empty(b:airline_head)
let b:airline_head .= ' | ' let b:airline_head .= ' | '
endif endif
endfor let b:airline_head .= (len(l:heads) > 1 ? s:vcs_config[l:vcs].exe : '') . s:format_name(l:heads[l:vcs])
if !empty(l:hg_head)
let l:heads.mercurial = (!empty(l:git_head) ? "hg:" : '') . s:format_name(l:hg_head)
if l:is_file_and_not_dir if l:is_file_and_not_dir
call s:get_hg_untracked(l:file) call s:get_untracked(l:file, s:vcs_config[l:vcs])
let l:heads.mercurial.= get(s:untracked_hg, l:file, '') let b:airline_head .= get(s:vcs_config[l:vcs]['untracked'], l:file, '')
endif endif
endif endfor
if empty(l:heads) if empty(l:heads)
if s:has_vcscommand if s:has_vcscommand