1
0
forked from aniani/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 #1971)
This commit is contained in:
Bram Moolenaar
2017-08-13 20:26:20 +02:00
parent 4f44b88684
commit 9f0139a2a8
5 changed files with 11 additions and 3 deletions

View File

@@ -215,3 +215,7 @@ func RunVimPiped(before, after, arguments, pipecmd)
endif
return 1
endfunc
func CanRunGui()
return has('gui') && ($DISPLAY != "" || has('gui_running'))
endfunc