diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 2fed7eed..1f8a6a15 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -567,8 +567,7 @@ endfunction function! s:UpdateDiagnosticNotifications() let should_display_diagnostics = g:ycm_show_diagnostics_ui && - \ s:DiagnosticUiSupportedForCurrentFiletype() && - \ pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' ) + \ s:DiagnosticUiSupportedForCurrentFiletype() if !should_display_diagnostics return diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index 58cdb2e1..e4700bd1 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -299,7 +299,8 @@ class YouCompleteMe( object ): def UpdateDiagnosticInterface( self ): - if not self.DiagnosticsForCurrentFileReady(): + if ( not self.DiagnosticsForCurrentFileReady() or + not self.NativeFiletypeCompletionUsable() ): return self._diag_interface.UpdateWithNewDiagnostics( self.GetDiagnosticsFromStoredRequest() )