summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-22 14:16:31 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-22 14:16:31 +0200
commit9049298f8d0bbc237b7c666c7ad6cdabe738e8fc (patch)
treef5a3b4182582beb7047ec7be20f2b550f888976b /runtime
parentfadacf01d0dbcc7a96ef5eee0ad57956eeab04d7 (diff)
patch 8.0.0649: when opening a help file the filetype is set several timesv8.0.0649
Problem: When opening a help file the filetype is set several times. Solution: When setting the filetype to the same value from a modeline, don't trigger FileType autocommands. Don't set the filetype to "help" when it's already set correctly.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/filetype.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 635e1c3ce7..d676329bdd 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2017 Jun 12
+" Last Change: 2017 Jun 20
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -48,6 +48,9 @@ func! s:StarSetf(ft)
endif
endfunc
+" Vim help file
+au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
+
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call s:Check_inp()