mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-21 13:04:54 +02:00
check for existence of git/hg before calling them
This commit is contained in:
parent
f706edee9f
commit
c39e5f82cc
@ -71,7 +71,7 @@ function! s:get_git_branch(path)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_git_untracked(file)
|
function! s:get_git_untracked(file)
|
||||||
if empty(a:file)
|
if empty(a:file) || !executable('git')
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
if !has_key(s:untracked_git, a:file)
|
if !has_key(s:untracked_git, a:file)
|
||||||
@ -88,7 +88,7 @@ function! s:get_git_untracked(file)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_hg_untracked(file)
|
function! s:get_hg_untracked(file)
|
||||||
if !s:has_lawrencium && empty(a:file)
|
if !s:has_lawrencium || empty(a:file) || !executable('hg')
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
" delete cache when unlet b:airline head?
|
" delete cache when unlet b:airline head?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user