Skip to content

Commit 7adeb09

Browse files
ambroisiechrisbra
authored andcommitted
patch 9.1.1886: filetype: Android aconfig files are not recognized
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 <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent b2e6b32 commit 7adeb09

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

runtime/autoload/dist/ft.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ vim9script
33
# Vim functions for file type detection
44
#
55
# Maintainer: The Vim Project <https://github.com/vim/vim>
6-
# Last Change: 2025 Oct 09
6+
# Last Change: 2025 Oct 28
77
# Former Maintainer: Bram Moolenaar <[email protected]>
88

99
# These functions are moved here from runtime/filetype.vim to make startup
@@ -2473,6 +2473,7 @@ const ft_from_ext = {
24732473
"textproto": "pbtxt",
24742474
"textpb": "pbtxt",
24752475
"pbtxt": "pbtxt",
2476+
"aconfig": "pbtxt", # Android aconfig files
24762477
# Poke
24772478
"pk": "poke",
24782479
# Nvidia PTX (Parallel Thread Execution)

src/testdir/test_filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def s:GetFilenameChecks(): dict<list<string>>
603603
papp: ['file.papp', 'file.pxml', 'file.pxsl'],
604604
pascal: ['file.pas', 'file.dpr', 'file.lpr'],
605605
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'],
606-
pbtxt: ['file.txtpb', 'file.textproto', 'file.textpb', 'file.pbtxt'],
606+
pbtxt: ['file.txtpb', 'file.textproto', 'file.textpb', 'file.pbtxt', 'file.aconfig'],
607607
pccts: ['file.g'],
608608
pcmk: ['file.pcmk'],
609609
pdf: ['file.pdf'],

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,8 @@ static char *(features[]) =
729729

730730
static int included_patches[] =
731731
{ /* Add new patch number below this line */
732+
/**/
733+
1886,
732734
/**/
733735
1885,
734736
/**/

0 commit comments

Comments
 (0)