Vim compat fix: type variables were introduced in 7.4.2071

To avoid issues for Vim versions between 7.4.1966 and 7.4.2071, we now use
type() to distinguish between the type of variable `job_id` being either Number
or Job.
This commit is contained in:
Marco Hinz 2017-02-17 16:25:00 +01:00
parent 255b2a636a
commit 34ee12d179
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -82,7 +82,7 @@ function! sy#repo#get_diff_start(vcs, do_register) abort
" Newer Vim
elseif v:version > 704 || v:version == 704 && has('patch1967')
if job_id is v:t_job
if type(job_id) != type(0)
silent! call job_stop(job_id)
endif