Preventing Vim thread block on file save

Syntastic would run SyntasticCheck on file save, which would unconditionally
call _latest_file_parse_request.Response() and thus block until the request
returned from the server. We don't want that, so we throw in an explicit check
for the request being ready.
This commit is contained in:
Strahinja Val Markovic 2013-10-11 19:09:21 -07:00
parent db45e243dd
commit 3ae10395ea

View File

@ -172,7 +172,7 @@ class YouCompleteMe( object ):
def GetDiagnosticsFromStoredRequest( self ):
if self._latest_file_parse_request:
if self.DiagnosticsForCurrentFileReady():
to_return = self._latest_file_parse_request.Response()
# We set the diagnostics request to None because we want to prevent
# Syntastic from repeatedly refreshing the buffer with the same diags.