health.vim: env var may be defined but empty #7498

This commit is contained in:
Justin M. Keyes 2017-11-07 02:15:34 +01:00
parent 85cfc4c4f9
commit b7f1885fab

View File

@ -174,7 +174,7 @@ function! s:check_terminal() abort
\ .(empty(kbs_entry) ? '? (not found)' : kdch1_entry))
endif
for env_var in ['XTERM_VERSION', 'VTE_VERSION', 'TERM_PROGRAM', 'COLORTERM', 'SSH_TTY']
if !empty(eval('$'.env_var))
if !exists('$'.env_var)
call health#report_info(printf("$%s='%s'", env_var, eval('$'.env_var)))
endif
endfor