diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 049d15cee..af1021bdc 100644 --- a/src/eval.c +++ b/src/eval.c @@ -8198,7 +8198,6 @@ item_copy( case VAR_SPECIAL: case VAR_JOB: case VAR_CHANNEL: - case VAR_BLOB: copy_tv(from, to); break; case VAR_LIST: @@ -8217,6 +8216,21 @@ item_copy( if (to->vval.v_list == NULL) ret = FAIL; break; + case VAR_BLOB: + to->v_type = VAR_BLOB; + if (from->vval.v_blob == NULL) + to->vval.v_blob = NULL; + else if (rettv_blob_alloc(to) == FAIL) + ret = FAIL; + else + { + int len = from->vval.v_blob->bv_ga.ga_len; + + to->vval.v_blob->bv_ga.ga_data = + vim_memsave(from->vval.v_blob->bv_ga.ga_data, len); + to->vval.v_blob->bv_ga.ga_len = len; + } + break; case VAR_DICT: to->v_type = VAR_DICT; to->v_lock = 0; |