From 60c9908d25a157be684aa920c95b388cbd6e2e00 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Wed, 7 Aug 2013 16:54:14 -0700 Subject: [PATCH] Ensure g:ycm_changedtick is always set. Fixes #493. --- autoload/youcompleteme.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 67c912b6..ae75ee26 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -226,11 +226,15 @@ endfunction 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() return endif - call s:SetUpYcmChangedTick() call s:SetUpCompleteopt() call s:SetCompleteFunc() py ycm_state.OnBufferVisit()