]> granicus.if.org Git - vim/commitdiff
patch 8.2.1885: filetype tests unnessarily creates swap files v8.2.1885
authorBram Moolenaar <Bram@vim.org>
Thu, 22 Oct 2020 10:33:32 +0000 (12:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 22 Oct 2020 10:33:32 +0000 (12:33 +0200)
Problem:    Filetype tests unnessarily creates swap files.
Solution:   Disable 'swapfile'. (Ken Takata, closes #7183)

src/testdir/test_filetype.vim
src/version.c

index 9d997cbcfc9011d4d84e67a8a9bbb134ccc308c0..a7d60d7412d074177b043b24f6a9de314c8bcc54 100644 (file)
@@ -549,6 +549,7 @@ let s:filename_case_checks = {
     \ }
 
 func CheckItems(checks)
+  set noswapfile
   for [ft, names] in items(a:checks)
     for i in range(0, len(names) - 1)
       new
@@ -565,6 +566,7 @@ func CheckItems(checks)
       bwipe!
     endfor
   endfor
+  set swapfile&
 endfunc
 
 func Test_filetype_detection()
index 56bf8f665b6839b59235b35bb35b8b3cd047b917..0716ca1e91daa799a863c67eeb9b156cfd1c4c7a 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1885,
 /**/
     1884,
 /**/