Prevent running Sy more than once during startup

This commit is contained in:
Marco Hinz 2017-02-03 20:48:48 +01:00
parent dea49a1967
commit dd34401bc3
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -48,6 +48,9 @@ function! sy#start() abort
endif endif
let b:sy.active = 1 let b:sy.active = 1
call sy#repo#detect(1) call sy#repo#detect(1)
elseif has('vim_starting')
call sy#verbose("Don't run Sy more than once during startup.")
return
elseif !b:sy.active elseif !b:sy.active
call sy#verbose('Inactive buffer.') call sy#verbose('Inactive buffer.')
return return