diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/runtest.vim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/old/testdir/runtest.vim b/test/old/testdir/runtest.vim index 5fda5bb440..935d033e4e 100644 --- a/test/old/testdir/runtest.vim +++ b/test/old/testdir/runtest.vim @@ -323,7 +323,14 @@ func RunTheTest(test) " buffer, continue until we end up in an empty no-name buffer without a swap " file. while bufname() != '' || execute('swapname') !~ 'No swap file' - bwipe! + let bn = bufnr() + + noswapfile bwipe! + + if bn == bufnr() + " avoid getting stuck in the same buffer + break + endif endwhile " Check if the test has left any swap files behind. Delete them before |