changeset 29181:71759abd2145 v8.2.5110

patch 8.2.5110: icon filetype not recognized from the first line Commit: https://github.com/vim/vim/commit/bf6614643f656d38d220c04befdcb1d35774853a Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 16 13:27:18 2022 +0100 patch 8.2.5110: icon filetype not recognized from the first line Problem: Icon filetype not recognized from the first line. Solution: Add a check for the first line. (Doug Kearns)
author Bram Moolenaar <Bram@vim.org>
date Thu, 16 Jun 2022 14:30:03 +0200
parents e2fe9d2d2b78
children b6f9992965c7
files runtime/autoload/dist/script.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/autoload/dist/script.vim
+++ b/runtime/autoload/dist/script.vim
@@ -189,6 +189,10 @@ def DetectFromHashBang(firstline: string
   elseif name =~ 'gforth\>'
     set ft=forth
 
+    # Icon
+  elseif name =~ 'icon\>'
+    set ft=icon
+
   endif
 enddef
 
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -718,6 +718,7 @@ let s:script_checks = {
       \ 'routeros': [['#!/path/rsc']],
       \ 'fish': [['#!/path/fish']],
       \ 'forth': [['#!/path/gforth']],
+      \ 'icon': [['#!/path/icon']],
       \ }
 
 " Various forms of "env" optional arguments.
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    5110,
+/**/
     5109,
 /**/
     5108,