0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2765: Vim9: not all blob operations work

Problem:    Vim9: not all blob operations work.
Solution:   Run more tests also with Vim9 script and :def functions.  Fix what
            doesn't work.
This commit is contained in:
Bram Moolenaar
2021-04-14 20:35:23 +02:00
parent b47bed2f7a
commit 0e3ff19196
8 changed files with 140 additions and 24 deletions

View File

@@ -2278,8 +2278,18 @@ call_def_function(
if (error)
status = FAIL;
else
status = blob_set_range(tv_dest->vval.v_blob,
n1, n2, tv);
{
long bloblen = blob_len(tv_dest->vval.v_blob);
if (check_blob_index(bloblen,
n1, TRUE, FALSE) == FAIL
|| check_blob_range(bloblen,
n1, n2, FALSE) == FAIL)
status = FAIL;
else
status = blob_set_range(
tv_dest->vval.v_blob, n1, n2, tv);
}
}
}