From 562bc0b37117a219cb4945fd99427f26762aae8c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 11 Jan 2026 06:44:24 +0800 Subject: [PATCH 1/2] vim-patch:9.1.2071: tests: test_ins_complete.vim leaves swapfiles behind Problem: tests: test_ins_complete.vim leaves swapfiles behind Solution: Close open buffers using :bw! instead of :close! closes: vim/vim#19137 https://github.com/vim/vim/commit/0e0cb8520c02c2fa9efa25c8f2de30dd5c3655d3 Co-authored-by: Christian Brabandt --- test/old/testdir/test_ins_complete.vim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim index d46ca3dd61..8d560dae19 100644 --- a/test/old/testdir/test_ins_complete.vim +++ b/test/old/testdir/test_ins_complete.vim @@ -1127,13 +1127,13 @@ func Test_completefunc_error() %d set complete=F call assert_fails('exe "normal a\"', 'E565:') - close! + bw! set completefunc& complete& delfunc CompleteFunc delfunc CompleteFunc2 delfunc CompleteFunc3 - close! + bw! endfunc " Test for returning non-string values from 'completefunc' @@ -1332,7 +1332,7 @@ func Test_complete_wrapscan() setlocal complete=w call feedkeys("itw\\\\\\\", 'xt') call assert_equal('two three four', getline(1)) - close! + bw! " complete words from the current buffer setlocal complete=. %d @@ -1340,7 +1340,7 @@ func Test_complete_wrapscan() call cursor(2, 1) call feedkeys("ion\\\\\\\", 'xt') call assert_equal('one two one two', getline(2)) - close! + bw! endfunc " Test for completing special characters @@ -1349,7 +1349,7 @@ func Test_complete_special_chars() call setline(1, 'int .*[-\^$ func float') call feedkeys("oin\\\\\\", 'xt') call assert_equal('int .*[-\^$ func float', getline(2)) - close! + bw! endfunc " Test for completion when text is wrapped across lines. @@ -1359,7 +1359,7 @@ func Test_complete_across_line() setlocal textwidth=20 exe "normal 2G$a re\\\\\\\\" call assert_equal(['one two three red', 'green blue one'], getline(2, '$')) - close! + bw! endfunc " Test for completing words with a '.' at the end of a word. @@ -1390,7 +1390,7 @@ func Test_complete_add_onechar() exe "normal aWOR\\\\\\\\\\" call assert_equal('workh', getline(3)) set ignorecase& backspace& - close! + bw! endfunc " Test for using CTRL-X CTRL-L to complete whole lines lines @@ -1456,7 +1456,7 @@ func Test_complete_with_cindent() setlocal cinkeys+==while exe "normal Giwh\ " call assert_equal("\twhile ", getline('$')) - close! + bw! endfunc " Test for completion. Complete commands and functions @@ -1479,7 +1479,7 @@ func Test_complete_cmdline() call delete('TestCommand2Test') delcom TestCommand1 delcom TestCommand2 - close! + bw! endfunc " Test for stopping completion without changing the match @@ -1528,7 +1528,7 @@ func Test_complete_stop() iunmap delfunc Save_mode1 delfunc Save_mode2 - close! + bw! endfunc " Test for typing CTRL-R in insert completion mode to insert a register @@ -1604,7 +1604,7 @@ func Test_complete_from_unloadedbuf() call writefile(['def'], "Xfile2") edit Xfile1 edit Xfile2 - new | close + new | bw enew bunload Xfile1 Xfile2 set complete=u @@ -1643,7 +1643,7 @@ func Test_complete_from_unlistedbuf() call writefile(['def'], "Xfile2") edit Xfile1 edit Xfile2 - new | close + new | bw bdel Xfile1 Xfile2 set complete=U " complete from an unlisted buffer From 2ae56fbb39e7e7e26c8dcad6e7e99060e3cc479a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 11 Jan 2026 06:45:08 +0800 Subject: [PATCH 2/2] vim-patch:9.1.2075: tests: wrong change to test_ins_complete.vim Problem: tests: wrong change to test_ins_complete.vim (zeertzjq, after v9.1.2071) Solution: Revert unintentional changes https://github.com/vim/vim/commit/28fd7e7702c8d328861b122ba87c41da33e7044b Co-authored-by: Christian Brabandt --- test/old/testdir/test_ins_complete.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim index 8d560dae19..15e7964c45 100644 --- a/test/old/testdir/test_ins_complete.vim +++ b/test/old/testdir/test_ins_complete.vim @@ -1604,7 +1604,7 @@ func Test_complete_from_unloadedbuf() call writefile(['def'], "Xfile2") edit Xfile1 edit Xfile2 - new | bw + new | close enew bunload Xfile1 Xfile2 set complete=u @@ -1643,7 +1643,7 @@ func Test_complete_from_unlistedbuf() call writefile(['def'], "Xfile2") edit Xfile1 edit Xfile2 - new | bw + new | close bdel Xfile1 Xfile2 set complete=U " complete from an unlisted buffer