Merge pull request #410 from coven/master
Branch extension bugs. Fix #444
This commit is contained in:
commit
7857cc2345
|
@ -168,7 +168,8 @@ function! airline#extensions#load()
|
|||
endif
|
||||
|
||||
if (get(g:, 'airline#extensions#branch#enabled', 1) && get(g:, 'airline_enable_branch', 1))
|
||||
\ && (exists('*fugitive#head') || exists('*lawrencium#statusline'))
|
||||
\ && (exists('*fugitive#head') || exists('*lawrencium#statusline') ||
|
||||
\ (get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine')))
|
||||
call airline#extensions#branch#init(s:ext)
|
||||
endif
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ endfunction
|
|||
function! s:check_in_path()
|
||||
if !exists('b:airline_branch_path')
|
||||
let root = get(b:, 'git_dir', get(b:, 'mercurial_dir', ''))
|
||||
let bufferpath = resolve(fnamemodify(expand('%'), ':p:h'))
|
||||
let bufferpath = resolve(fnamemodify(expand('%'), ':p'))
|
||||
|
||||
if !filereadable(root) "not a file
|
||||
" if .git is a directory, it's the old submodule format
|
||||
|
|
Loading…
Reference in New Issue