]> granicus.if.org Git - vim/commitdiff
patch 8.2.2006: .pbtxt files are not recognized v8.2.2006
authorBram Moolenaar <Bram@vim.org>
Wed, 18 Nov 2020 11:12:39 +0000 (12:12 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 Nov 2020 11:12:39 +0000 (12:12 +0100)
Problem:    .pbtxt files are not recognized.
Solution:   Recognize .pbtxt as protobuf text buffers. (closes #7326)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index a16a28d7af5636689d20cecb7d4bf27a0c316299..938140203175aadc19be4d870ef6f9d560b17891 100644 (file)
@@ -1305,6 +1305,7 @@ au BufNewFile,BufRead *.pml                       setf promela
 
 " Google protocol buffers
 au BufNewFile,BufRead *.proto                  setf proto
+au BufNewFile,BufRead *.pbtxt                  setf pbtxt
 
 " Protocols
 au BufNewFile,BufRead */etc/protocols          setf protocols
index 0e5a0cd04ce4d13de3adef1c224870c99752fa22..90e2ca080f00ea2509760eb0afb1b77bb938dd6f 100644 (file)
@@ -345,6 +345,7 @@ let s:filename_checks = {
     \ 'papp': ['file.papp', 'file.pxml', 'file.pxsl'],
     \ 'pascal': ['file.pas', 'file.pp', '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.pbtxt'],
     \ 'pccts': ['file.g'],
     \ 'pdf': ['file.pdf'],
     \ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
index 2191c340608aaf03d08455872d5a9f8687732e28..4b91ba453ca5906a4448487fa44ff68060418ec2 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2006,
 /**/
     2005,
 /**/