From e9ad613fdfd91c7d4b090e404976f9ea8667fae0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 5 Dec 2022 09:51:01 +0800 Subject: vim-patch:8.2.3109: check for $DISPLAY never fails Problem: Check for $DISPLAY never fails. Solution: Use eval(). https://github.com/vim/vim/commit/f6d877975ba93fc9b4bee2c5d2aff88dbf9bea59 Co-authored-by: Bram Moolenaar --- src/nvim/testdir/check.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 0fba0e107b..a7ecf455bc 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -126,7 +126,7 @@ endfunc " Command to Check for an environment variable command -nargs=1 CheckEnv call CheckEnv() func CheckEnv(name) - if empty('$' .. a:name) + if empty(eval('$' .. a:name)) throw 'Skipped: Environment variable ' .. a:name .. ' is not set' endif endfunc -- cgit