]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0886: filetype: debian control file not detected v9.1.0886
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sun, 24 Nov 2024 13:34:01 +0000 (14:34 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 24 Nov 2024 13:34:01 +0000 (14:34 +0100)
Problem:  filetype: debian control file not detected
Solution: detect 'debian/control' files as debcontrol filetype
          (author)

closes: #16067

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index ef8c0e922e6d0f10fbcf0428c788e900b5ea5c19..08290d0b8723d8331425e8cc8a8bb083289c6fff 100644 (file)
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2024 Nov 19
+" Last Change: 2024 Nov 24
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " Listen very carefully, I will say this only once
@@ -646,9 +646,9 @@ au BufNewFile,BufRead *.dfy                 setf dafny
 au BufRead,BufNewfile *.dart,*.drt             setf dart
 
 " Debian Control
-au BufNewFile,BufRead */debian/control         setf debcontrol
+au BufNewFile,BufRead */{debian,DEBIAN}/control                setf debcontrol
 au BufNewFile,BufRead control
-       \  if getline(1) =~ '^Source:'
+       \  if getline(1) =~ '^Source:\|^Package:'
        \|   setf debcontrol
        \| endif
 
index 001a970aeb87a4caf6478beffaa63ac7d034eca3..4a905a889a1a0074ab4a4cd3f35073c442937357 100644 (file)
@@ -211,7 +211,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     datascript: ['file.ds'],
     dcd: ['file.dcd'],
     debchangelog: ['changelog.Debian', 'changelog.dch', 'NEWS.Debian', 'NEWS.dch', '/debian/changelog'],
-    debcontrol: ['/debian/control', 'any/debian/control'],
+    debcontrol: ['/debian/control', 'any/debian/control', 'any/DEBIAN/control'],
     debcopyright: ['/debian/copyright', 'any/debian/copyright'],
     debsources: ['/etc/apt/sources.list', '/etc/apt/sources.list.d/file.list', 'any/etc/apt/sources.list', 'any/etc/apt/sources.list.d/file.list'],
     deb822sources: ['/etc/apt/sources.list.d/file.sources', 'any/etc/apt/sources.list.d/file.sources'],
index b569807722b1fc6b9b6305ad82b98c39a86486cd..6f5c7a49847a8ad12a5503f572ab59e4d9a2999d 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    886,
 /**/
     885,
 /**/