mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-24 06:25:31 +02:00
Suggest fix for #2045
This commit is contained in:
parent
1240403ce5
commit
ce45960049
@ -277,12 +277,18 @@ function! airline#extensions#load()
|
|||||||
call add(s:loaded_ext, 'fugitiveline')
|
call add(s:loaded_ext, 'fugitiveline')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (get(g:, 'airline#extensions#virtualenv#enabled', 1) && (exists(':VirtualEnvList') || isdirectory($VIRTUAL_ENV)))
|
" NOTE: This means that if both virtualenv and poetv are enabled and
|
||||||
|
" available, poetv silently takes precedence and the virtualenv
|
||||||
|
" extension won't be initialized. Since both extensions currently just
|
||||||
|
" add a virtualenv identifier section to the airline, this seems
|
||||||
|
" acceptable.
|
||||||
|
if (get(g:, 'airline#extensions#poetv#enabled', 1) && (exists(':PoetvActivate')))
|
||||||
|
call airline#extensions#poetv#init(s:ext)
|
||||||
|
call add(s:loaded_ext, 'poetv')
|
||||||
|
elseif (get(g:, 'airline#extensions#virtualenv#enabled', 1) && (exists(':VirtualEnvList')))
|
||||||
call airline#extensions#virtualenv#init(s:ext)
|
call airline#extensions#virtualenv#init(s:ext)
|
||||||
call add(s:loaded_ext, 'virtualenv')
|
call add(s:loaded_ext, 'virtualenv')
|
||||||
endif
|
elseif (isdirectory($VIRTUAL_ENV))
|
||||||
|
|
||||||
if (get(g:, 'airline#extensions#poetv#enabled', 1) && (exists(':PoetvActivate') || isdirectory($VIRTUAL_ENV)))
|
|
||||||
call airline#extensions#poetv#init(s:ext)
|
call airline#extensions#poetv#init(s:ext)
|
||||||
call add(s:loaded_ext, 'poetv')
|
call add(s:loaded_ext, 'poetv')
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user