diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-02-05 20:08:36 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-02-05 20:08:36 +0100 |
commit | 73b2470896034e9d5a13837eec49b2f1065b8c12 (patch) | |
tree | 0d5ac73cfeaa6f9e32f8d1b17e783ef5bf3ca2c6 /runtime | |
parent | be094a157913535d46cc6ac39465ce1ea7dae132 (diff) |
updated for version 7.3.430v7.3.430
Problem: When a custom filetype detection uses "augroup END" the conf
fileytpe detection does not have the filetypedetect group.
Solution: Always end the group and include filetypedetect in the conf
autocommand. (Lech Lorens)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/filetype.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 26a435b480..a3ae34a4dd 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2545,17 +2545,19 @@ au BufNewFile,BufRead *.txt,*.text setf text " detected filetypes. runtime! ftdetect/*.vim +" NOTE: The above command could have ended the filetypedetect autocmd group +" and started another one. Let's make sure it has ended to get to a consistant +" state. +augroup END " Generic configuration file (check this last, it's just guessing!) -au BufNewFile,BufRead,StdinReadPost * +au filetypedetect BufNewFile,BufRead,StdinReadPost * \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat \ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#' \ || getline(4) =~ '^#' || getline(5) =~ '^#') | \ setf conf | \ endif -augroup END - " If the GUI is already running, may still need to install the Syntax menu. " Don't do it when the 'M' flag is included in 'guioptions'. |