Adding OnVimLeave support to Completer class

This commit is contained in:
Strahinja Val Markovic 2013-07-07 10:59:48 -07:00
parent 7a13fd8af6
commit 451acc0073
4 changed files with 17 additions and 0 deletions

View File

@ -207,6 +207,7 @@ function! s:SetUpCompleteopt()
endfunction
function! s:OnVimLeave()
py ycm_state.OnVimLeave()
py extra_conf_store.CallExtraConfVimCloseIfExists()
endfunction

View File

@ -278,6 +278,10 @@ class Completer( object ):
pass
def OnVimLeave( self ):
pass
def OnUserCommand( self, arguments ):
vimsupport.PostVimMessage( NO_USER_COMMANDS )

View File

@ -130,6 +130,11 @@ class GeneralCompleterStore( Completer ):
completer.OnInsertLeave()
def OnVimLeave( self ):
for completer in self._all_completers:
completer.OnVimLeave()
def OnCurrentIdentifierFinished( self ):
for completer in self._all_completers:
completer.OnCurrentIdentifierFinished()

View File

@ -144,6 +144,13 @@ class YouCompleteMe( object ):
self.GetFiletypeCompleter().OnInsertLeave()
def OnVimLeave( self ):
self.gencomp.OnVimLeave()
if self.FiletypeCompletionUsable():
self.GetFiletypeCompleter().OnVimLeave()
def DiagnosticsForCurrentFileReady( self ):
if self.FiletypeCompletionUsable():
return self.GetFiletypeCompleter().DiagnosticsForCurrentFileReady()