Avoid useless updates

This commit is contained in:
Marco Hinz 2017-02-24 12:48:35 +01:00
parent 01bcf8afab
commit 0a65a0c504
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -64,8 +64,13 @@ function! sy#start() abort
call sy#disable() call sy#disable()
endif endif
else else
call sy#verbose('Updating signs.') let job_id = get(b:, 'sy_job_id_'.b:sy.vcs)
call sy#repo#get_diff_start(b:sy.vcs, 0) if type(job_id) != type(0) || job_id > 0
call sy#verbose('Update is already in progress.', b:sy.vcs)
else
call sy#verbose('Updating signs.', b:sy.vcs)
call sy#repo#get_diff_start(b:sy.vcs, 0)
endif
endif endif
endfunction endfunction