From df46f9197764b92e596ad6a5a8c297edc51dd6f6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 19 Sep 2020 10:51:10 -0400 Subject: [PATCH] vim-patch:8.1.2263: 'noesckeys' test fails in GUI Problem: 'noesckeys' test fails in GUI. Solution: Skip the test in the GUI. https://github.com/vim/vim/commit/215ba3b63698f3755b2c4de66fc728cc14a8a590 Cherry-pick "CheckNotGui" command from patch 8.1.1826. --- src/nvim/testdir/check.vim | 8 ++++++++ src/nvim/testdir/test_edit.vim | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 073873bcb0..e0ebe8fd49 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -65,3 +65,11 @@ func CheckCanRunGui() throw 'Skipped: cannot start the GUI' endif endfunc + +" Command to check that not currently using the GUI +command CheckNotGui call CheckNotGui() +func CheckNotGui() + if has('gui_running') + throw 'Skipped: only works in the terminal' + endif +endfunc diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index a863a254b6..dbe12fc8fc 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -1,9 +1,11 @@ " Test for edit functions -" + if exists("+t_kD") let &t_kD="[3;*~" endif +source check.vim + " Needed for testing basic rightleft: Test_edit_rightleft source view_util.vim @@ -1516,6 +1518,7 @@ func Test_edit_startinsert() endfunc func Test_edit_noesckeys() + CheckNotGui new " moves cursor when 'esckeys' is set