mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-22 21:45:06 +02:00
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
|
||||
|
||||
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
|
||||
|
||||
function! airline#util#has_lawrencium()
|
||||
|
Loading…
x
Reference in New Issue
Block a user