Moved some code around

This commit is contained in:
Strahinja Val Markovic 2014-09-15 12:39:05 -07:00
parent 8e14914602
commit 7cb41a20ac

View File

@ -61,12 +61,12 @@ function! youcompleteme#Enable()
call s:SetUpSigns()
call s:SetUpSyntaxHighlighting()
call youcompleteme#EnableCursorMovedAutocommands()
if g:ycm_allow_changing_updatetime && &updatetime > 2000
set ut=2000
endif
call youcompleteme#EnableCursorMovedAutocommands()
augroup youcompleteme
autocmd!
" Note that these events will NOT trigger for the file vim is started with;
@ -92,6 +92,21 @@ function! youcompleteme#Enable()
endfunction
function youcompleteme#EnableCursorMovedAutocommands()
augroup ycmcompletemecursormove
autocmd!
autocmd CursorMovedI * call s:OnCursorMovedInsertMode()
autocmd CursorMoved * call s:OnCursorMovedNormalMode()
augroup END
endfunction
function youcompleteme#DisableCursorMovedAutocommands()
autocmd! ycmcompletemecursormove CursorMoved *
autocmd! ycmcompletemecursormove CursorMovedI *
endfunction
function! s:SetUpPython() abort
py import sys
py import vim
@ -808,18 +823,6 @@ endfunction
command! YcmDiags call s:ShowDiagnostics()
function youcompleteme#EnableCursorMovedAutocommands()
augroup ycmcompletemecursormove
autocmd!
autocmd CursorMovedI * call s:OnCursorMovedInsertMode()
autocmd CursorMoved * call s:OnCursorMovedNormalMode()
augroup END
endfunction
function youcompleteme#DisableCursorMovedAutocommands()
autocmd! ycmcompletemecursormove CursorMoved *
autocmd! ycmcompletemecursormove CursorMovedI *
endfunction
" This is basic vim plugin boilerplate
let &cpo = s:save_cpo