async: rename variable

rename g:airline#init#async variable to g:airline#init#vim_async
because that is what it is for: showing whether vim supports async. Is
not set vor nvim, because nvim always supports jobs.
This commit is contained in:
Christian Brabandt 2017-08-23 18:10:59 +02:00
parent 06272275b5
commit b77f326b33
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
3 changed files with 5 additions and 5 deletions

View File

@ -125,7 +125,7 @@ function! s:update_hg_branch(...)
let cmd='LC_ALL=C hg qtop'
let stl=lawrencium#statusline()
if !empty(stl) && get(b:, 'airline_do_mq_check', 1)
if g:airline#init#async
if g:airline#init#vim_async
call airline#async#get_mq_async(cmd, expand('%:p'))
elseif has("nvim")
call airline#async#nvim_get_mq_async(cmd, expand('%:p'))
@ -200,7 +200,7 @@ function! s:update_untracked()
for vcs in keys(s:vcs_config)
let config = s:vcs_config[vcs]
if g:airline#init#async
if g:airline#init#vim_async
" Note that asynchronous update updates s:vcs_config only, and only
" s:update_untracked updates b:buffer_vcs_config. If s:vcs_config is
" invalidated again before s:update_untracked is called, then we lose the
@ -308,7 +308,7 @@ endfunction
function! s:reset_untracked_cache(shellcmdpost)
" shellcmdpost - whether function was called as a result of ShellCmdPost hook
if !g:airline#init#async && !has('nvim')
if !g:airline#init#vim_async && !has('nvim')
if a:shellcmdpost
" Clear cache only if there was no error or the script uses an
" asynchronous interface. Otherwise, cache clearing would overwrite

View File

@ -25,7 +25,7 @@ function! airline#extensions#po#stats()
endif
let cmd = 'msgfmt --statistics -o /dev/null -- '
if g:airline#init#async
if g:airline#init#vim_async
call airline#async#get_msgfmt_stat(cmd, expand('%:p'))
elseif has("nvim")
call airline#async#nvim_get_msgfmt_stat(cmd, expand('%:p'))

View File

@ -18,7 +18,7 @@ function! airline#init#bootstrap()
let g:airline#init#bootstrapping = 1
let g:airline#init#async = (v:version >= 800 && has('job'))
let g:airline#init#vim_async = (v:version >= 800 && has('job'))
let g:airline#init#is_windows = has('win32') || has('win64')
call s:check_defined('g:airline_detect_modified', 1)