Merge remote-tracking branch 'scrooloose/master'

This commit is contained in:
Chris Hoffman 2011-07-18 20:13:55 -05:00
commit a8741530d9

View File

@ -304,6 +304,9 @@ function! s:Disable(...)
if !empty(ft) && index(g:syntastic_disabled_filetypes, ft) == -1
call add(g:syntastic_disabled_filetypes, ft)
endif
"will cause existing errors to be cleared
call s:UpdateErrors()
endfunction
"enable syntax checking for the given filetype (defaulting to current ft)
@ -314,6 +317,13 @@ function! s:Enable(...)
if i != -1
call remove(g:syntastic_disabled_filetypes, i)
endif
if !&modified
call s:UpdateErrors()
redraw!
else
echom "Syntasic: enabled for the '" . ft . "' filetype. :write out to update errors"
endif
endfunction
" vim: set et sts=4 sw=4: