aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-08-29 01:28:09 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-08-30 21:12:26 -0400
commitaa60cb10838996b1764fd8bed2f2c48467b3fab6 (patch)
tree4eca1d0032ffc8d9a4b5df855127333fc84d7d30
parent2bae98a5eaf3a53851ccbbbc043e3e401026cdb7 (diff)
downloadrneovim-aa60cb10838996b1764fd8bed2f2c48467b3fab6.tar.gz
rneovim-aa60cb10838996b1764fd8bed2f2c48467b3fab6.tar.bz2
rneovim-aa60cb10838996b1764fd8bed2f2c48467b3fab6.zip
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.
-rw-r--r--src/nvim/testdir/check.vim8
-rw-r--r--src/nvim/testdir/shared.vim4
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