diff options
Diffstat (limited to 'src/blob.c')
-rw-r--r-- | src/blob.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/blob.c b/src/blob.c index 4685dc97c..6855935ec 100644 --- a/src/blob.c +++ b/src/blob.c @@ -415,9 +415,16 @@ blob_set_range(blob_T *dest, long n1, long n2, typval_T *src) blob_remove(typval_T *argvars, typval_T *rettv) { int error = FALSE; - long idx = (long)tv_get_number_chk(&argvars[1], &error); + long idx; long end; + if (in_vim9script() + && (check_for_blob_arg(argvars, 0) == FAIL + || check_for_number_arg(argvars, 1) == FAIL + || check_for_opt_number_arg(argvars, 2) == FAIL)) + return; + + idx = (long)tv_get_number_chk(&argvars[1], &error); if (!error) { blob_T *b = argvars[0].vval.v_blob; |