util: micro-optimization of existence check for fugitive
This commit is contained in:
parent
51e74f1d1f
commit
0370a3b89b
|
@ -129,7 +129,10 @@ function! airline#util#ignore_buf(name)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#util#has_fugitive()
|
function! airline#util#has_fugitive()
|
||||||
return exists('*fugitive#head') || exists('*FugitiveHead')
|
if !exists("s:has_fugitive")
|
||||||
|
let s:has_fugitive = exists('*fugitive#head') || exists('*FugitiveHead')
|
||||||
|
endif
|
||||||
|
return s:has_fugitive
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#util#has_lawrencium()
|
function! airline#util#has_lawrencium()
|
||||||
|
|
Loading…
Reference in New Issue