patch 9.0.2063: pacman hooks are detected as conf filetype

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>
This commit is contained in:
Guido Cella
2023-10-23 19:27:06 +02:00
committed by Christian Brabandt
parent c038427d2a
commit 7d254dbc2d
3 changed files with 5 additions and 3 deletions

View File

@ -1509,7 +1509,7 @@ au BufNewFile,BufRead *.nmconnection setf confini
" Pacman hooks " Pacman hooks
au BufNewFile,BufRead *.hook au BufNewFile,BufRead *.hook
\ if getline(1) == '[Trigger]' | \ if getline(1) == '[Trigger]' |
\ setf conf | \ setf confini |
\ endif \ endif
" Pam conf " Pam conf

View File

@ -1480,12 +1480,12 @@ func Test_hook_file()
call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook', 'D') call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook', 'D')
split Xfile.hook split Xfile.hook
call assert_equal('conf', &filetype) call assert_equal('confini', &filetype)
bwipe! bwipe!
call writefile(['not pacman'], 'Xfile.hook') call writefile(['not pacman'], 'Xfile.hook')
split Xfile.hook split Xfile.hook
call assert_notequal('conf', &filetype) call assert_notequal('confini', &filetype)
bwipe! bwipe!
filetype off filetype off

View File

@ -704,6 +704,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 */
/**/
2063,
/**/ /**/
2062, 2062,
/**/ /**/