aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-06-16 15:53:38 +0200
committerGitHub <noreply@github.com>2022-06-16 15:53:38 +0200
commit35c9fe98958ddcdcb8d4febe381e07b80fa73835 (patch)
tree228efbc7eac4bfe531e5435ee59cbf5f9ea8a12c
parent179faa3edd6120a483b55aadf0a367fbf07b25fd (diff)
downloadrneovim-35c9fe98958ddcdcb8d4febe381e07b80fa73835.tar.gz
rneovim-35c9fe98958ddcdcb8d4febe381e07b80fa73835.tar.bz2
rneovim-35c9fe98958ddcdcb8d4febe381e07b80fa73835.zip
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) https://github.com/vim/vim/commit/bf6614643f656d38d220c04befdcb1d35774853a
-rw-r--r--runtime/scripts.vim4
-rw-r--r--src/nvim/testdir/test_filetype.vim1
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index dd47f65ba0..36763a4a82 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -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
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index fb6c9e46aa..3c05045dd3 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -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.