add sntastic_auto_copen option

This commit is contained in:
Martin Grenfell 2009-07-13 21:38:50 +12:00
parent 68d6ac09a2
commit 624c0b370b

View File

@ -96,6 +96,10 @@ if !exists("g:syntastic_enable_signs")
let g:syntastic_enable_signs = 0
endif
if !exists("g:syntastic_enable_auto_copen")
let g:syntastic_enable_auto_copen = 0
endif
"load all the syntax checkers
runtime! syntax_checkers/*.vim
@ -108,6 +112,10 @@ function! s:UpdateErrors()
call s:ClearSigns()
call s:SignErrors()
endif
if g:syntastic_enable_auto_copen && s:BufHasErrors()
call s:ShowQFList()
endif
endfunction
"detect and cache all syntax errors in this buffer