mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-10 22:11:51 +08:00
util: micro-optimization of existence check for vcscommand plugin
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user