mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-20 20:44:46 +02: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
|
endfunction
|
||||||
|
|
||||||
function! airline#util#has_vcscommand()
|
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
|
endfunction
|
||||||
|
|
||||||
function! airline#util#has_custom_scm()
|
function! airline#util#has_custom_scm()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user