Buffer identifiers are now added on BufEnter
This commit is contained in:
parent
5d6e839118
commit
8ed1c599e2
@ -30,7 +30,7 @@ function! youcompleteme#Enable()
|
|||||||
augroup youcompleteme
|
augroup youcompleteme
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd CursorMovedI * call s:OnMovedI()
|
autocmd CursorMovedI * call s:OnMovedI()
|
||||||
autocmd BufRead,BufEnter * call s:SetCompleteFunc()
|
autocmd BufRead,BufEnter * call s:OnBufferVisit()
|
||||||
autocmd CursorHold,CursorHoldI * py csystem.AddBufferIdentifiers()
|
autocmd CursorHold,CursorHoldI * py csystem.AddBufferIdentifiers()
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
@ -64,6 +64,12 @@ function! youcompleteme#Enable()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! s:OnBufferVisit()
|
||||||
|
call s:SetCompleteFunc()
|
||||||
|
py csystem.AddBufferIdentifiers()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! s:SetCompleteFunc()
|
function! s:SetCompleteFunc()
|
||||||
let &completefunc = 'youcompleteme#Complete'
|
let &completefunc = 'youcompleteme#Complete'
|
||||||
let &l:completefunc = 'youcompleteme#Complete'
|
let &l:completefunc = 'youcompleteme#Complete'
|
||||||
|
Loading…
Reference in New Issue
Block a user