Buffer identifiers are now added on BufEnter

This commit is contained in:
Strahinja Val Markovic 2012-05-12 15:23:45 -07:00
parent 5d6e839118
commit 8ed1c599e2

View File

@ -30,7 +30,7 @@ function! youcompleteme#Enable()
augroup youcompleteme
autocmd!
autocmd CursorMovedI * call s:OnMovedI()
autocmd BufRead,BufEnter * call s:SetCompleteFunc()
autocmd BufRead,BufEnter * call s:OnBufferVisit()
autocmd CursorHold,CursorHoldI * py csystem.AddBufferIdentifiers()
augroup END
@ -64,6 +64,12 @@ function! youcompleteme#Enable()
endfunction
function! s:OnBufferVisit()
call s:SetCompleteFunc()
py csystem.AddBufferIdentifiers()
endfunction
function! s:SetCompleteFunc()
let &completefunc = 'youcompleteme#Complete'
let &l:completefunc = 'youcompleteme#Complete'