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:
@@ -215,3 +215,7 @@ func RunVimPiped(before, after, arguments, pipecmd)
|
||||
endif
|
||||
return 1
|
||||
endfunc
|
||||
|
||||
func CanRunGui()
|
||||
return has('gui') && ($DISPLAY != "" || has('gui_running'))
|
||||
endfunc
|
||||
|
@@ -1,6 +1,7 @@
|
||||
" Tests specifically for the GUI
|
||||
|
||||
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
|
||||
source shared.vim
|
||||
if !CanRunGui()
|
||||
finish
|
||||
endif
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
" Tests specifically for the GUI features/options that need to be set up at
|
||||
" startup to take effect at runtime.
|
||||
|
||||
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
|
||||
source shared.vim
|
||||
if !CanRunGui()
|
||||
finish
|
||||
endif
|
||||
|
||||
|
@@ -417,7 +417,7 @@ endfunc
|
||||
|
||||
" must be last, we can't go back from GUI to terminal
|
||||
func Test_zz_terminal_in_gui()
|
||||
if !has('gui')
|
||||
if !CanRunGui()
|
||||
return
|
||||
endif
|
||||
gui -f
|
||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
933,
|
||||
/**/
|
||||
932,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user