diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-12-27 13:53:01 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-12-27 13:53:01 +0100 |
commit | 2f3e00171749c5fddc2b76d080d2bb26f1765405 (patch) | |
tree | c1ce218de5e4a242ec58fd0bf1e6f07a1eb35bf9 | |
parent | 341102fe9f26e3f4207f14e097348d3bd6831b0d (diff) | |
download | rneovim-2f3e00171749c5fddc2b76d080d2bb26f1765405.tar.gz rneovim-2f3e00171749c5fddc2b76d080d2bb26f1765405.tar.bz2 rneovim-2f3e00171749c5fddc2b76d080d2bb26f1765405.zip |
health.vim: minor refactor (group related logic)
-rw-r--r-- | runtime/autoload/health/provider.vim | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 39e592c471..83dee043a0 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -370,10 +370,11 @@ function! s:check_python(version) abort let python_bin = '' endif - " Check if $VIRTUAL_ENV is active - let virtualenv_inactive = 0 + " Check if $VIRTUAL_ENV is active. if exists('$VIRTUAL_ENV') + let virtualenv_inactive = 0 + if !empty(pyenv) let pyenv_prefix = resolve(s:trim(s:system([pyenv, 'prefix']))) if $VIRTUAL_ENV != pyenv_prefix @@ -382,13 +383,13 @@ function! s:check_python(version) abort elseif !empty(pyname) && exepath(pyname) !~# '^'.$VIRTUAL_ENV.'/' let virtualenv_inactive = 1 endif - endif - if virtualenv_inactive - call health#report_warn( - \ '$VIRTUAL_ENV exists but appears to be inactive. ' - \ . 'This could lead to unexpected results.', - \ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654/5229' ]) + if virtualenv_inactive + call health#report_warn( + \ '$VIRTUAL_ENV exists but appears to be inactive. ' + \ . 'This could lead to unexpected results.', + \ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654' ]) + endif endif " Diagnostic output |