refresh errors on bufreadpost instead of filetype

this is to stop the multiple syntax checking invocations that were
occurring when &ft was being detected as compound eg ruby.sinatra. i.e.
the ft was getting set as ruby, then another autocommand was resetting
it to ruby.sinatra, causing the syntax checking to be run twice.
This commit is contained in:
Martin Grenfell 2009-07-12 12:13:06 +12:00
parent 23a3edb4ed
commit 68d6ac09a2

View File

@ -99,9 +99,8 @@ endif
"load all the syntax checkers
runtime! syntax_checkers/*.vim
"refresh and redraw all the error info for this buf upon saving or changing
"filetypes
autocmd filetype,bufwritepost * call s:UpdateErrors()
"refresh and redraw all the error info for this buf when saving or reading
autocmd bufreadpost,bufwritepost * call s:UpdateErrors()
function! s:UpdateErrors()
call s:CacheErrors()