changeset 21849:18a341a4919c v8.2.1474

patch 8.2.1474: /usr/lib/udef/rules.d not recognized as udevrules Commit: https://github.com/vim/vim/commit/624b6eaf20f3e8c669425b6a32f17fb9ec2ebbd2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 17 21:17:25 2020 +0200 patch 8.2.1474: /usr/lib/udef/rules.d not recognized as udevrules Problem: /usr/lib/udef/rules.d not recognized as udevrules. Solution: Adjust match pattern. (Haochen Tong, closes 36722)
author Bram Moolenaar <Bram@vim.org>
date Mon, 17 Aug 2020 21:30:04 +0200
parents eb3a152c8171
children f2ef45b1633d
files runtime/autoload/dist/ft.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -575,7 +575,7 @@ endfunc
 let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
 func dist#ft#FTRules()
   let path = expand('<amatch>:p')
-  if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
+  if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|\%(usr/\)\=lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
     setf udevrules
     return
   endif
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -472,6 +472,7 @@ let s:filename_checks = {
     \ 'uc': ['file.uc'],
     \ 'udevconf': ['/etc/udev/udev.conf'],
     \ 'udevperm': ['/etc/udev/permissions.d/file.permissions'],
+    \ 'udevrules': ['/etc/udev/rules.d/file.rules', '/usr/lib/udev/rules.d/file.rules', '/lib/udev/rules.d/file.rules'],
     \ 'uil': ['file.uit', 'file.uil'],
     \ 'updatedb': ['/etc/updatedb.conf'],
     \ 'upstart': ['/usr/share/upstart/file.conf', '/usr/share/upstart/file.override', '/etc/init/file.conf', '/etc/init/file.override', '/.init/file.conf', '/.init/file.override', '/.config/upstart/file.conf', '/.config/upstart/file.override'],
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1474,
+/**/
     1473,
 /**/
     1472,