Patch 9.0.1010
Problem:    Stray warnings for existing swap files.
Solution:   Wipe out the buffer until it has no name and no swap file.
Files:      src/testdir/runtest.vim, src/testdir/test_autocmd.vim


*** ../vim-9.0.1009/src/testdir/runtest.vim     2022-12-05 13:50:49.718052362 
+0000
--- src/testdir/runtest.vim     2022-12-05 15:47:12.378220666 +0000
***************
*** 364,369 ****
--- 364,376 ----
    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()
*** ../vim-9.0.1009/src/testdir/test_autocmd.vim        2022-11-28 
18:51:38.967571631 +0000
--- src/testdir/test_autocmd.vim        2022-12-05 15:49:34.918309362 +0000
***************
*** 578,583 ****
--- 578,585 ----
    call term_sendkeys(buf, '$')
    call term_sendkeys(buf, ":echo g:scrolled\<CR>")
    call WaitForAssert({-> assert_match('^3 ', term_getline(buf, 6))}, 1000)
+ 
+   call StopVimInTerminal(buf)
  endfunc
  
  func Test_WinClosed()
***************
*** 3162,3168 ****
          \ 'v:cmdarg =  ++ff=mac',
          \ 'v:cmdarg =  ++enc=utf-8'], getline(1, '$'))
  
!   close!
    augroup FileReadCmdTest
      au!
    augroup END
--- 3164,3170 ----
          \ 'v:cmdarg =  ++ff=mac',
          \ 'v:cmdarg =  ++enc=utf-8'], getline(1, '$'))
  
!   bwipe!
    augroup FileReadCmdTest
      au!
    augroup END
*** ../vim-9.0.1009/src/version.c       2022-12-05 15:24:16.556553434 +0000
--- src/version.c       2022-12-05 15:31:22.705436628 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1010,
  /**/

-- 
You can tune a file system, but you can't tuna fish
                                                        -- man tunefs

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221205155113.C5F3E1C1D84%40moolenaar.net.

Raspunde prin e-mail lui