util: micro-optimization of existence check for lawrencium

This commit is contained in:
Christian Brabandt 2019-08-20 22:24:08 +02:00
parent 0370a3b89b
commit 5df9e23f14
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 4 additions and 1 deletions

View File

@ -136,7 +136,10 @@ function! airline#util#has_fugitive()
endfunction
function! airline#util#has_lawrencium()
return exists('*lawrencium#statusline')
if !exists("s:has_lawrencium")
let s:has_lawrencium = exists('*lawrencium#statusline')
endif
return s:has_lawrencium
endfunction
function! airline#util#has_vcscommand()