Ensure g:ycm_changedtick is always set.

Fixes #493.
This commit is contained in:
Strahinja Val Markovic 2013-08-07 16:54:14 -07:00
parent 360a70b1b3
commit 60c9908d25

View File

@ -226,11 +226,15 @@ endfunction
function! s:OnBufferVisit() function! s:OnBufferVisit()
" We need to do this even when we are not allowed to complete in the current
" file because we might be allowed to complete in the future! The canonical
" example is creating a new buffer with :enew and then setting a filetype.
call s:SetUpYcmChangedTick()
if !s:AllowedToCompleteInCurrentFile() if !s:AllowedToCompleteInCurrentFile()
return return
endif endif
call s:SetUpYcmChangedTick()
call s:SetUpCompleteopt() call s:SetUpCompleteopt()
call s:SetCompleteFunc() call s:SetCompleteFunc()
py ycm_state.OnBufferVisit() py ycm_state.OnBufferVisit()