Auto merge of #2994 - micbou:fix-should-resend, r=puremourning
[READY] Fix resending request when buffer is not yet parsed Fixes https://github.com/Valloric/YouCompleteMe/issues/2993. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2994) <!-- Reviewable:end -->
This commit is contained in:
commit
84554d2194
@ -67,7 +67,7 @@ class Buffer( object ):
|
|||||||
|
|
||||||
|
|
||||||
def ShouldResendParseRequest( self ):
|
def ShouldResendParseRequest( self ):
|
||||||
return self._parse_request.ShouldResend()
|
return bool( self._parse_request and self._parse_request.ShouldResend() )
|
||||||
|
|
||||||
|
|
||||||
def UpdateDiagnostics( self, force=False ):
|
def UpdateDiagnostics( self, force=False ):
|
||||||
|
@ -1058,3 +1058,10 @@ def YouCompleteMe_OnCompleteDone_NoCompletionRequest_test( ycm,
|
|||||||
on_complete_done ):
|
on_complete_done ):
|
||||||
ycm.OnCompleteDone()
|
ycm.OnCompleteDone()
|
||||||
on_complete_done.assert_not_called()
|
on_complete_done.assert_not_called()
|
||||||
|
|
||||||
|
|
||||||
|
@YouCompleteMeInstance()
|
||||||
|
def YouCompleteMe_ShouldResendFileParseRequest_NoParseRequest_test( ycm ):
|
||||||
|
current_buffer = VimBuffer( 'current_buffer' )
|
||||||
|
with MockVimBuffers( [ current_buffer ], current_buffer ):
|
||||||
|
assert_that( ycm.ShouldResendFileParseRequest(), equal_to( False ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user