neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit a2f4bad781efd6c011dc93845fce342b6477162d
parent a0d4649c17e0af855494a2a680b9d7a7a4fb5702
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Wed, 19 Apr 2023 11:08:24 +0800

vim-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.

https://github.com/vim/vim/commit/23526d2539e8679ea8df14e3a018101dedc3f391

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Mtest/old/testdir/runtest.vim | 7+++++++
Mtest/old/testdir/test_autocmd.vim | 2+-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/test/old/testdir/runtest.vim b/test/old/testdir/runtest.vim @@ -319,6 +319,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/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim @@ -3156,7 +3156,7 @@ func Test_autocmd_FileReadCmd() \ 'v:cmdarg = ++ff=mac', \ 'v:cmdarg = ++enc=utf-8'], getline(1, '$')) - close! + bwipe! augroup FileReadCmdTest au! augroup END