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