Push check for NativeFiletypeCompletionUsable down
Another way in which the commit d768447 forced the client to wait for the server to start was the UpdateDiagnosticNotifications call from the FileReadyToParse which is called right after a buffer is loaded. In any way if we don't have any previous FileReadyToParse request done for the current file we bail out, so we we can wait for a FileReadyToParse response to be available before asking if a completer is usable for the current filetype. ref: #1529
This commit is contained in:
parent
30036ca8e2
commit
4104f7be82
@ -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
|
||||
|
@ -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() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user