vim-patch:8.2.5110: icon filetype not recognized from the first line (#18987)

Problem:    Icon filetype not recognized from the first line.
Solution:   Add a check for the first line. (Doug Kearns)
bf6614643f
This commit is contained in:
Christian Clason 2022-06-16 15:53:38 +02:00 committed by GitHub
parent 179faa3edd
commit 35c9fe9895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -202,6 +202,10 @@ if s:line1 =~# "^#!"
elseif s:name =~# 'gforth\>'
set ft=forth
" Icon
elseif s:name =~# 'icon\>'
set ft=icon
endif
unlet s:name

View File

@ -717,6 +717,7 @@ let s:script_checks = {
\ 'routeros': [['#!/path/rsc']],
\ 'fish': [['#!/path/fish']],
\ 'forth': [['#!/path/gforth']],
\ 'icon': [['#!/path/icon']],
\ }
" Various forms of "env" optional arguments.