]> granicus.if.org Git - vim/commitdiff
patch 8.2.3109: check for $DISPLAY never fails v8.2.3109
authorBram Moolenaar <Bram@vim.org>
Mon, 5 Jul 2021 15:49:02 +0000 (17:49 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 5 Jul 2021 15:49:02 +0000 (17:49 +0200)
Problem:    Check for $DISPLAY never fails.
Solution:   Use eval().

src/testdir/check.vim
src/version.c

index 504a1928ef081d0b62449d37e36a25303879f471..6d2d564fac1bdf672c95d84f460c2874ab480084 100644 (file)
@@ -139,7 +139,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
index 9b1ac9aa59aeff1d7cd951a1727804c49e1b8d52..a36ec80cf464808f455ce882f1adc5d4a1e3fefc 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3109,
 /**/
     3108,
 /**/