Merge pull request #2158 from larrybradley/fix-venv

Fix handling of virtualenv and poetv plugins
This commit is contained in:
Christian Brabandt 2020-07-09 08:42:32 +02:00 committed by GitHub
commit 768bd0f5c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -293,13 +293,13 @@ function! airline#extensions#load()
" 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')))
if (get(g:, 'airline#extensions#poetv#enabled', 0) && (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')))
elseif (get(g:, 'airline#extensions#virtualenv#enabled', 0) && (exists(':VirtualEnvList')))
call airline#extensions#virtualenv#init(s:ext)
call add(s:loaded_ext, 'virtualenv')
elseif (get(g:, 'airline#extensions#poetv#enabled', 1) && (isdirectory($VIRTUAL_ENV)))
elseif (get(g:, 'airline#extensions#poetv#enabled', 0) && (isdirectory($VIRTUAL_ENV)))
call airline#extensions#poetv#init(s:ext)
call add(s:loaded_ext, 'poetv')
endif