Ensuring b:ycm_changedtick always exists

Fixes #503 (I hope).
This commit is contained in:
Strahinja Val Markovic 2013-08-13 10:02:59 -07:00
parent 591135cb91
commit 96d4874fe0

View File

@ -265,6 +265,10 @@ endfunction
function! s:OnFileReadyToParse()
" We need to call this just in case there is no b:ycm_changetick; this can
" happen for special buffers.
call s:SetUpYcmChangedTick()
let buffer_changed = b:changedtick != b:ycm_changedtick.file_ready_to_parse
if buffer_changed
py ycm_state.OnFileReadyToParse()