vim-patch:8.2.3109: check for $DISPLAY never fails

Problem:    Check for $DISPLAY never fails.
Solution:   Use eval().

f6d877975b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2022-12-05 09:51:01 +08:00
parent adcf7a2219
commit e9ad613fdf

View File

@ -126,7 +126,7 @@ endfunc
" Command to Check for an environment variable
command -nargs=1 CheckEnv call CheckEnv(<f-args>)
func CheckEnv(name)
if empty('$' .. a:name)
if empty(eval('$' .. a:name))
throw 'Skipped: Environment variable ' .. a:name .. ' is not set'
endif
endfunc