aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-17 20:37:45 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-03-17 20:38:55 -0400
commitfb95bb38b5e9b83dcbea663744d80439109c6d0a (patch)
tree1ee7e630b40a6872d1d928da45b9f61b2d2a2130 /runtime/autoload
parent8394bf676b57a2675142b336101d6a81385f75d6 (diff)
downloadrneovim-fb95bb38b5e9b83dcbea663744d80439109c6d0a.tar.gz
rneovim-fb95bb38b5e9b83dcbea663744d80439109c6d0a.tar.bz2
rneovim-fb95bb38b5e9b83dcbea663744d80439109c6d0a.zip
vim-patch:8.1.0771: some shell filetype patterns end in a star
Problem: Some shell filetype patterns end in a star. Solution: Make sure that patterns not ending in a star are preferred. https://github.com/vim/vim/commit/147e7d0caba8b66ff11622e514142bcc3d24403a
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/dist/ft.vim14
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index fe5184cd45..6ed39cb9f1 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -1,7 +1,7 @@
" Vim functions for file type detection
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2017 Dec 05
+" Last Change: 2019 Jan 18
" These functions are moved here from runtime/filetype.vim to make startup
" faster.
@@ -484,6 +484,10 @@ endfunc
" Called from filetype.vim and scripts.vim.
func dist#ft#SetFileTypeSH(name)
+ if did_filetype()
+ " Filetype was already detected
+ return
+ endif
if expand("<amatch>") =~ g:ft_ignore_pat
return
endif
@@ -531,6 +535,10 @@ endfunc
" as used for Tcl.
" Also called from scripts.vim, thus can't be local to this script.
func dist#ft#SetFileTypeShell(name)
+ if did_filetype()
+ " Filetype was already detected
+ return
+ endif
if expand("<amatch>") =~ g:ft_ignore_pat
return
endif
@@ -551,6 +559,10 @@ func dist#ft#SetFileTypeShell(name)
endfunc
func dist#ft#CSH()
+ if did_filetype()
+ " Filetype was already detected
+ return
+ endif
if exists("g:filetype_csh")
call dist#ft#SetFileTypeShell(g:filetype_csh)
elseif &shell =~ "tcsh"