Delete autocommands when Bootstrap failed
When bootstrapping fails to setup `g:_uspy` (e.g. without Python), the functions used in the autocommands are not being defined. Since it makes no sense to have autocommands defined for UltiSnips in this case, this patch deletes them (via a new augroup 'UltiSnips').
This commit is contained in:
parent
2ad6ad4493
commit
c57c717e33
@ -16,6 +16,10 @@ endfunction
|
||||
|
||||
call UltiSnips#bootstrap#Bootstrap()
|
||||
if !exists("g:_uspy")
|
||||
" Delete the autocommands defined in plugin/UltiSnips.vim.
|
||||
augroup UltiSnips
|
||||
au!
|
||||
augroup END
|
||||
finish
|
||||
end
|
||||
|
||||
|
@ -57,10 +57,13 @@ function! UltiSnips_Anon(...)
|
||||
return call(function('UltiSnips#Anon'), a:000)
|
||||
endfunction
|
||||
|
||||
au CursorMovedI * call UltiSnips#CursorMoved()
|
||||
au CursorMoved * call UltiSnips#CursorMoved()
|
||||
au BufLeave * call UltiSnips#LeavingBuffer()
|
||||
au InsertLeave * call UltiSnips#LeavingInsertMode()
|
||||
augroup UltiSnips
|
||||
au!
|
||||
au CursorMovedI * call UltiSnips#CursorMoved()
|
||||
au CursorMoved * call UltiSnips#CursorMoved()
|
||||
au BufLeave * call UltiSnips#LeavingBuffer()
|
||||
au InsertLeave * call UltiSnips#LeavingInsertMode()
|
||||
augroup END
|
||||
|
||||
call UltiSnips#map_keys#MapKeys()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user