diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-17 21:07:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-17 21:07:22 +0200 |
commit | 021bda56710d98c09a6b35610a476ab2dd8c58ad (patch) | |
tree | ef1e8f444ad876989fde5d1ae961805642cfa9de /src/eval.c | |
parent | 7b22117c4ecf383b6f35acef041773a83ec28220 (diff) |
patch 8.2.1473: items in a list given to :const can still be modifiedv8.2.1473
Problem: Items in a list given to :const can still be modified.
Solution: Work like ":lockvar! name" but don't lock referenced items.
Make locking a blob work.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 3c4a8c562d..c80013960a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1218,6 +1218,8 @@ set_var_lval( semsg(_(e_letwrong), op); return; } + if (var_check_lock(lp->ll_blob->bv_lock, lp->ll_name, FALSE)) + return; if (lp->ll_range && rettv->v_type == VAR_BLOB) { |