vim-patch:8.1.1831: confusing skipped message

Problem:    Confusing skipped message.
Solution:   Drop "run" from "run start the GUI".
2514315fc2

Cherry-pick 'CheckCanRunGui' user command from patch 8.1.1826.
This commit is contained in:
Jan Edmund Lazo
2020-08-29 01:28:09 -04:00
parent 2bae98a5ea
commit aa60cb1083
2 changed files with 8 additions and 4 deletions

View File

@@ -57,3 +57,11 @@ func CheckRunVimInTerminal()
throw 'Skipped: cannot run Vim in a terminal window'
endif
endfunc
" Command to check that we can run the GUI
command CheckCanRunGui call CheckCanRunGui()
func CheckCanRunGui()
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
throw 'Skipped: cannot start the GUI'
endif
endfunc

View File

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