Forcing the critical 'B' flag in cpoptions

Fixes #223.
This commit is contained in:
Strahinja Val Markovic 2013-04-04 17:48:45 -07:00
parent a75c92bb6a
commit e4fc9a1136

View File

@ -67,6 +67,7 @@ function! youcompleteme#Enable()
autocmd InsertEnter * call s:OnInsertEnter()
augroup END
call s:SetUpCpoptions()
call s:SetUpCompleteopt()
call s:SetUpKeyMappings()
@ -153,6 +154,13 @@ function! s:AllowedToCompleteInCurrentFile()
endfunction
function! s:SetUpCpoptions()
" Without this flag in cpoptions, critical YCM mappings do not work. There's
" no way to not have this and have YCM working, so force the flag.
set cpoptions+=B
endfunction
function! s:SetUpCompleteopt()
" Some plugins (I'm looking at you, vim-notes) change completeopt by for
" instance adding 'longest'. This breaks YCM. So we force our settings.