CursorHold is now tied to OnCursorHold func

This commit is contained in:
Strahinja Val Markovic 2012-05-12 15:26:04 -07:00
parent 8ed1c599e2
commit 6696d79518

View File

@ -31,7 +31,7 @@ function! youcompleteme#Enable()
autocmd!
autocmd CursorMovedI * call s:OnMovedI()
autocmd BufRead,BufEnter * call s:OnBufferVisit()
autocmd CursorHold,CursorHoldI * py csystem.AddBufferIdentifiers()
autocmd CursorHold,CursorHoldI * call s:OnCursorHold()
augroup END
" We need menuone in completeopt, otherwise when there's only one candidate
@ -70,6 +70,11 @@ function! s:OnBufferVisit()
endfunction
function! s:OnCursorHold()
py csystem.AddBufferIdentifiers()
endfunction
function! s:SetCompleteFunc()
let &completefunc = 'youcompleteme#Complete'
let &l:completefunc = 'youcompleteme#Complete'