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)
9f0139a2a8
This commit is contained in:
Jan Edmund Lazo
2019-06-13 00:29:10 -04:00
parent e6a1bea1eb
commit 47a5456670

View File

@@ -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