From 0ea218022a912d1fc64a886b82a9dd283fb071db Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 28 Jul 2012 11:42:43 -0700 Subject: [PATCH] Leaving omnifunc mode on InsertLeave --- autoload/youcompleteme.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 2fa69b48..315d91a3 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -44,6 +44,7 @@ function! youcompleteme#Enable() " initial file. autocmd BufRead,BufEnter * call s:OnBufferVisit() autocmd CursorHold,CursorHoldI * call s:OnCursorHold() + autocmd InsertLeave * call s:OnInsertLeave() augroup END " We need menuone in completeopt, otherwise when there's only one candidate @@ -127,6 +128,10 @@ function! s:OnMovedI() endfunction +function! s:OnInsertLeave() + let s:omnifunc_mode = 0 +endfunction + function! s:IdentifierFinishedOperations() if !pyeval( 'ycm.CurrentIdentifierFinished()' ) return