From 6696d7951879015d7f623a76dec15c89b1611e18 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 12 May 2012 15:26:04 -0700 Subject: [PATCH] CursorHold is now tied to OnCursorHold func --- autoload/youcompleteme.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index a06c5705..2528f89b 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -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'