Leaving omnifunc mode on InsertLeave

This commit is contained in:
Strahinja Val Markovic 2012-07-28 11:42:43 -07:00
parent 2667a82441
commit 0ea218022a

View File

@ -44,6 +44,7 @@ function! youcompleteme#Enable()
" initial file. " initial file.
autocmd BufRead,BufEnter * call s:OnBufferVisit() autocmd BufRead,BufEnter * call s:OnBufferVisit()
autocmd CursorHold,CursorHoldI * call s:OnCursorHold() autocmd CursorHold,CursorHoldI * call s:OnCursorHold()
autocmd InsertLeave * call s:OnInsertLeave()
augroup END augroup END
" We need menuone in completeopt, otherwise when there's only one candidate " We need menuone in completeopt, otherwise when there's only one candidate
@ -127,6 +128,10 @@ function! s:OnMovedI()
endfunction endfunction
function! s:OnInsertLeave()
let s:omnifunc_mode = 0
endfunction
function! s:IdentifierFinishedOperations() function! s:IdentifierFinishedOperations()
if !pyeval( 'ycm.CurrentIdentifierFinished()' ) if !pyeval( 'ycm.CurrentIdentifierFinished()' )
return return