]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.2063: pacman hooks are detected as conf filetype v9.0.2063
authorGuido Cella <guido@guidocella.xyz>
Mon, 23 Oct 2023 17:27:06 +0000 (19:27 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 23 Oct 2023 17:27:06 +0000 (19:27 +0200)
Problem:  pacman hooks are detected as conf filetype
Solution: make it consistent to pacman.conf and detect those
          hooks as confini

Because confini has much better syntax highlighting than conf.

For reference, I identified pacman.conf and pacman hooks as dosini in
https://github.com/vim/vim/pull/6335, then
https://github.com/vim/vim/pull/10213 changed them to conf, then
https://github.com/vim/vim/pull/10518 changed pacman.conf to confini but
forgot to change hooks.

closes: #13399

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Guido Cella <guido@guidocella.xyz>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index aa66bead324af5e3048e9f55bed84ce48d24ebe3..567c0a3e9521c8c75726ede149d97339e3e8cba8 100644 (file)
@@ -1509,7 +1509,7 @@ au BufNewFile,BufRead *.nmconnection                      setf confini
 " Pacman hooks
 au BufNewFile,BufRead *.hook
        \ if getline(1) == '[Trigger]' |
-       \   setf conf |
+       \   setf confini |
        \ endif
 
 " Pam conf
index 6b049afa9bfff288a2f620b837059a37ad537ac5..1df823718670a797a1ea775de581c0fe67db0bcd 100644 (file)
@@ -1480,12 +1480,12 @@ func Test_hook_file()
 
   call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook', 'D')
   split Xfile.hook
-  call assert_equal('conf', &filetype)
+  call assert_equal('confini', &filetype)
   bwipe!
 
   call writefile(['not pacman'], 'Xfile.hook')
   split Xfile.hook
-  call assert_notequal('conf', &filetype)
+  call assert_notequal('confini', &filetype)
   bwipe!
 
   filetype off
index 67f39f28f0c1908629d1849b1cf2997100da2f14..3389927fa52a7957b099f57eb2ce7f3548083f9e 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2063,
 /**/
     2062,
 /**/