# HG changeset patch # User Bram Moolenaar # Date 1670256005 -3600 # Node ID 49bd0e97549d472c2183a64d04ffbe0124c697f9 # Parent 8685c826da45c29d12ff421bf1bfd82aa9ee6676 patch 9.0.1010: stray warnings for existing swap files Commit: https://github.com/vim/vim/commit/23526d2539e8679ea8df14e3a018101dedc3f391 Author: Bram Moolenaar Date: Mon Dec 5 15:50:41 2022 +0000 patch 9.0.1010: stray warnings for existing swap files Problem: Stray warnings for existing swap files. Solution: Wipe out the buffer until it has no name and no swap file. diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -364,6 +364,13 @@ func RunTheTest(test) call add(s:messages, message) let s:done += 1 + " May be editing some buffer, wipe it out. Then we may end up in another + " buffer, continue until we end up in an empty no-name buffer without a swap + " file. + while bufname() != '' || execute('swapname') !~ 'No swap file' + bwipe! + endwhile + " Check if the test has left any swap files behind. Delete them before " running tests again, they might interfere. let swapfiles = s:GetSwapFileList() diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -578,6 +578,8 @@ func Test_WinScrolled_long_wrapped() call term_sendkeys(buf, '$') call term_sendkeys(buf, ":echo g:scrolled\") call WaitForAssert({-> assert_match('^3 ', term_getline(buf, 6))}, 1000) + + call StopVimInTerminal(buf) endfunc func Test_WinClosed() @@ -3162,7 +3164,7 @@ func Test_autocmd_FileReadCmd() \ 'v:cmdarg = ++ff=mac', \ 'v:cmdarg = ++enc=utf-8'], getline(1, '$')) - close! + bwipe! augroup FileReadCmdTest au! augroup END diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1010, +/**/ 1009, /**/ 1008,