Don't call SyntasticCheck if not syntastic checker

If the user forced YCM to not register itself as the Syntastic checker, we
should not be calling SyntasticCheck since that would slow down everything.

Fixes #416
This commit is contained in:
Strahinja Val Markovic 2013-07-01 10:45:24 -07:00
parent 5496984931
commit 16b6f877c6

View File

@ -380,7 +380,8 @@ endfunction
function! s:UpdateDiagnosticNotifications()
if get( g:, 'loaded_syntastic_plugin', 0 ) &&
\ pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' ) &&
\ pyeval( 'ycm_state.DiagnosticsForCurrentFileReady()' )
\ pyeval( 'ycm_state.DiagnosticsForCurrentFileReady()' ) &&
\ g:ycm_register_as_syntastic_checker
SyntasticCheck
endif
endfunction