diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 37029e0dd7..698172442e 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -1620,18 +1620,7 @@ void set_var_lval(lval_T *lp, char *endp, typval_T *rettv, int copy, const bool bool error = false; const char val = (char)tv_get_number_chk(rettv, &error); if (!error) { - garray_T *const gap = &lp->ll_blob->bv_ga; - - // Allow for appending a byte. Setting a byte beyond - // the end is an error otherwise. - if (lp->ll_n1 < gap->ga_len || lp->ll_n1 == gap->ga_len) { - ga_grow(&lp->ll_blob->bv_ga, 1); - tv_blob_set(lp->ll_blob, (int)lp->ll_n1, (uint8_t)val); - if (lp->ll_n1 == gap->ga_len) { - gap->ga_len++; - } - } - // error for invalid range was already given in get_lval() + tv_blob_set_append(lp->ll_blob, (int)lp->ll_n1, (uint8_t)val); } } } else if (op != NULL && *op != '=') { |