From 3ae10395eaadd0a95425620751a7f923cc336323 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Fri, 11 Oct 2013 19:09:21 -0700 Subject: [PATCH] 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. --- python/ycm/youcompleteme.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index abc802e8..8d5d1143 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -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.