1
0
forked from aniani/vim

patch 8.2.4642: Vim9: in :def function script var cannot be null

Problem:    Vim9: in :def function script var cannot be null.
Solution:   Only initialize a script variable when not set to a null value.
            (closes #10034)
This commit is contained in:
Bram Moolenaar
2022-03-28 15:22:35 +01:00
parent 471b3aed3e
commit 859cc21c6b
8 changed files with 119 additions and 7 deletions

View File

@@ -337,7 +337,11 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int flags)
if (tv->v_type == VAR_STRING)
return &t_string;
if (tv->v_type == VAR_BLOB)
{
if (tv->vval.v_blob == NULL)
return &t_blob_null;
return &t_blob;
}
if (tv->v_type == VAR_LIST)
{