summaryrefslogtreecommitdiffstats
path: root/src/testdir/screendump.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-03-24 17:56:13 +0100
committerBram Moolenaar <Bram@vim.org>2018-03-24 17:56:13 +0100
commite7499ddc33508d3d341e96f84a0e7b95b2d6927c (patch)
treef1c4189908b7a798f96dfb3a97f5b84fbd7df0ca /src/testdir/screendump.vim
parent897e63c4c0623078b5b39e2715b10f456a2453e7 (diff)
patch 8.0.1638: popup test fails depending on environment variablev8.0.1638
Problem: Popup test fails depending on environment variable. Solution: Reset $COLORFGBG when running Vim in a terminal. (closes #2693)
Diffstat (limited to 'src/testdir/screendump.vim')
-rw-r--r--src/testdir/screendump.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index c84221580c..c9b8085dea 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -30,6 +30,13 @@ func RunVimInTerminal(arguments, options)
" Remove it here.
call delete(".swp")
+ if exists('$COLORFGBG')
+ " Clear $COLORFGBG to avoid 'background' being set to "dark", which will
+ " only be corrected if the response to t_RB is received, which may be too
+ " late.
+ let $COLORFGBG = ''
+ endif
+
" Make a horizontal and vertical split, so that we can get exactly the right
" size terminal window. Works only when we currently have one window.
call assert_equal(1, winnr('$'))