From 47a545667006ded57dc9660333e4ea2cab23b679 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 13 Jun 2019 00:29:10 -0400 Subject: vim-patch:8.0.0933: terminal test tries to start GUI when it's not possible Problem: Terminal test tries to start GUI when it's not possible. Solution: Check if the GUI can run. (James McCoy, closes vim/vim#1971) https://github.com/vim/vim/commit/9f0139a2a869b0804e5b91a65e3d5952c9091879 --- src/nvim/testdir/shared.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index eb6798f353..29af05fe3f 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -246,3 +246,7 @@ func! Screenline(lnum) let line = join(chars, '') return matchstr(line, '^.\{-}\ze\s*$') endfunc + +func CanRunGui() + return has('gui') && ($DISPLAY != "" || has('gui_running')) +endfunc -- cgit