]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1886: filetype: Android aconfig files are not recognized v9.1.1886
authorBruno Belanyi <bruno@belanyi.fr>
Tue, 28 Oct 2025 20:31:55 +0000 (20:31 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 28 Oct 2025 20:34:12 +0000 (20:34 +0000)
Problem:  filetype: Android aconfig files are not recognized
Solution: Detect *.aconfig files as pbtxt filetype (Bruno Belanyi)

Reference:
https://source.android.com/docs/setup/build/feature-flagging/declare-flag

closes: #18656

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/ft.vim
src/testdir/test_filetype.vim
src/version.c

index 39ee2a94c9b7b35dedafa995bfc8deefdf072d72..791dccf67ccaa621e6caa20ad682d922e05f4787 100644 (file)
@@ -3,7 +3,7 @@ vim9script
 # Vim functions for file type detection
 #
 # Maintainer:          The Vim Project <https://github.com/vim/vim>
-# Last Change:         2025 Oct 09
+# Last Change:         2025 Oct 28
 # Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 # These functions are moved here from runtime/filetype.vim to make startup
@@ -2473,6 +2473,7 @@ const ft_from_ext = {
   "textproto": "pbtxt",
   "textpb": "pbtxt",
   "pbtxt": "pbtxt",
+  "aconfig": "pbtxt", # Android aconfig files
   # Poke
   "pk": "poke",
   # Nvidia PTX (Parallel Thread Execution)
index e3cc298bab09eda3966fae0a173491b19236664f..f7d95082d8a6a0f6b8c56392719ac75f4c0bf48b 100644 (file)
@@ -603,7 +603,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     papp: ['file.papp', 'file.pxml', 'file.pxsl'],
     pascal: ['file.pas', 'file.dpr', 'file.lpr'],
     passwd: ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak', '/etc/passwd', '/etc/passwd-', '/etc/passwd.edit', '/etc/shadow', '/etc/shadow-', '/etc/shadow.edit', '/var/backups/passwd.bak', '/var/backups/shadow.bak'],
-    pbtxt: ['file.txtpb', 'file.textproto', 'file.textpb', 'file.pbtxt'],
+    pbtxt: ['file.txtpb', 'file.textproto', 'file.textpb', 'file.pbtxt', 'file.aconfig'],
     pccts: ['file.g'],
     pcmk: ['file.pcmk'],
     pdf: ['file.pdf'],
index 7b814f7260e9f377e89bf92c34d0a85b0f2b66ca..f52904b53872837348beda97ad2512c4838dc16a 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1886,
 /**/
     1885,
 /**/