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()
|
function! s:UpdateDiagnosticNotifications()
|
||||||
let should_display_diagnostics = g:ycm_show_diagnostics_ui &&
|
let should_display_diagnostics = g:ycm_show_diagnostics_ui &&
|
||||||
\ s:DiagnosticUiSupportedForCurrentFiletype() &&
|
\ s:DiagnosticUiSupportedForCurrentFiletype()
|
||||||
\ pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' )
|
|
||||||
|
|
||||||
if !should_display_diagnostics
|
if !should_display_diagnostics
|
||||||
return
|
return
|
||||||
|
@ -299,7 +299,8 @@ class YouCompleteMe( object ):
|
|||||||
|
|
||||||
|
|
||||||
def UpdateDiagnosticInterface( self ):
|
def UpdateDiagnosticInterface( self ):
|
||||||
if not self.DiagnosticsForCurrentFileReady():
|
if ( not self.DiagnosticsForCurrentFileReady() or
|
||||||
|
not self.NativeFiletypeCompletionUsable() ):
|
||||||
return
|
return
|
||||||
self._diag_interface.UpdateWithNewDiagnostics(
|
self._diag_interface.UpdateWithNewDiagnostics(
|
||||||
self.GetDiagnosticsFromStoredRequest() )
|
self.GetDiagnosticsFromStoredRequest() )
|
||||||
|
Loading…
Reference in New Issue
Block a user