From e00b02429520ad2c8f087024900c8adce5b42d46 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 28 Dec 2016 14:54:30 -0500 Subject: vim-patch:7.4.2149 Problem: If a test leaves a window open a following test may fail. Solution: Always close extra windows after running a test. https://github.com/vim/vim/commit/7cba71d7e3576639679b6a3aedeeb1ac07f7f2f5 Apply the runtest.vim changes that were missing from 4431975210b58c6b0403ee50172bad3c8729bbb2 --- src/nvim/testdir/runtest.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 931013877d..20863bbaf3 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -86,6 +86,12 @@ function RunTheTest(test) if exists("*TearDown") call TearDown() endif + + " Close any extra windows and make the current one not modified. + while winnr('$') > 1 + bwipe! + endwhile + set nomodified endfunc " Source the test script. First grab the file name, in case the script -- cgit