From 68d6ac09a2606b93f18cfcb1b365225a36862dc6 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 12 Jul 2009 12:13:06 +1200 Subject: [PATCH] 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. --- plugin/syntastic.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 6a69e42e..8e53b15a 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -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()