mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-01-31 21:35:16 +08:00
util: micro-optimization of existence check for vcscommand plugin
This commit is contained in:
parent
5df9e23f14
commit
57fb980df7
|
@ -143,7 +143,10 @@ function! airline#util#has_lawrencium()
|
|||
endfunction
|
||||
|
||||
function! airline#util#has_vcscommand()
|
||||
return get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine')
|
||||
if !exists("s:has_vcscommand")
|
||||
let s:has_vcscommand = exists('*VCSCommandGetStatusLine')
|
||||
endif
|
||||
return get(g:, 'airline#extensions#branch#use_vcscommand', 0) && s:has_vcscommand
|
||||
endfunction
|
||||
|
||||
function! airline#util#has_custom_scm()
|
||||
|
|
Loading…
Reference in New Issue
Block a user