]> granicus.if.org Git - vim/commitdiff
patch 8.0.1465: python2 and python3 detection not tested v8.0.1465
authorBram Moolenaar <Bram@vim.org>
Sat, 3 Feb 2018 21:35:40 +0000 (22:35 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Feb 2018 21:35:40 +0000 (22:35 +0100)
Problem:    Python2 and python3 detection not tested. (Matej Cepl)
Solution:   Add test for detecting python2 and python3.  Also detect a script
            using "js" as javascript.

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

index fe05d265b32d78881dbc59720e38e675eb76bb1c..e271db89dcb0d935f989c2191d04fc4aa8b5ef9e 100644 (file)
@@ -137,7 +137,7 @@ if s:line1 =~# "^#!"
     set ft=ruby
 
     " JavaScript
-  elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>'
+  elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>'
     set ft=javascript
 
     " BC calculator
index ccf801683936e03a97621f73fc68d765b4834f55..62dbc7473f35eb9ecf8038947be14f51c691d40a 100644 (file)
@@ -561,10 +561,13 @@ let s:script_checks = {
       \ 'perl6': [['#!/path/perl6']],
       \ 'perl': [['#!/path/perl']],
       \ 'php': [['#!/path/php']],
-      \ 'python': [['#!/path/python']],
+      \ 'python': [['#!/path/python'],
+      \            ['#!/path/python2'],
+      \            ['#!/path/python3']],
       \ 'groovy': [['#!/path/groovy']],
       \ 'ruby': [['#!/path/ruby']],
       \ 'javascript': [['#!/path/node'],
+      \                ['#!/path/js'],
       \                ['#!/path/nodejs'],
       \                ['#!/path/rhino']],
       \ 'bc': [['#!/path/bc']],
index 811d5210548c0584a9c9839bae67e459f4681fb8..352d491bfaad250323bfacbe6b5831d4e2860686 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1465,
 /**/
     1464,
 /**/