From aa60cb10838996b1764fd8bed2f2c48467b3fab6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 29 Aug 2020 01:28:09 -0400 Subject: [PATCH] vim-patch:8.1.1831: confusing skipped message Problem: Confusing skipped message. Solution: Drop "run" from "run start the GUI". https://github.com/vim/vim/commit/2514315fc2530170ad7681e45e2b6d1f0680c9eb Cherry-pick 'CheckCanRunGui' user command from patch 8.1.1826. --- src/nvim/testdir/check.vim | 8 ++++++++ src/nvim/testdir/shared.vim | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index b530d3a441..073873bcb0 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -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 diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index 41ff9b2bd6..d56fff1fe8 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -329,7 +329,3 @@ func RunVimPiped(before, after, arguments, pipecmd) endif return 1 endfunc - -func CanRunGui() - return has('gui') && ($DISPLAY != "" || has('gui_running')) -endfunc