0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-12-05 15:50:41 +00:00
parent 72b5b0d51a
commit 23526d2539
3 changed files with 12 additions and 1 deletions

View File

@@ -364,6 +364,13 @@ func RunTheTest(test)
call add(s:messages, message) call add(s:messages, message)
let s:done += 1 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 " Check if the test has left any swap files behind. Delete them before
" running tests again, they might interfere. " running tests again, they might interfere.
let swapfiles = s:GetSwapFileList() let swapfiles = s:GetSwapFileList()

View File

@@ -578,6 +578,8 @@ func Test_WinScrolled_long_wrapped()
call term_sendkeys(buf, '$') call term_sendkeys(buf, '$')
call term_sendkeys(buf, ":echo g:scrolled\<CR>") call term_sendkeys(buf, ":echo g:scrolled\<CR>")
call WaitForAssert({-> assert_match('^3 ', term_getline(buf, 6))}, 1000) call WaitForAssert({-> assert_match('^3 ', term_getline(buf, 6))}, 1000)
call StopVimInTerminal(buf)
endfunc endfunc
func Test_WinClosed() func Test_WinClosed()
@@ -3162,7 +3164,7 @@ func Test_autocmd_FileReadCmd()
\ 'v:cmdarg = ++ff=mac', \ 'v:cmdarg = ++ff=mac',
\ 'v:cmdarg = ++enc=utf-8'], getline(1, '$')) \ 'v:cmdarg = ++enc=utf-8'], getline(1, '$'))
close! bwipe!
augroup FileReadCmdTest augroup FileReadCmdTest
au! au!
augroup END augroup END

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1010,
/**/ /**/
1009, 1009,
/**/ /**/