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

patch 8.2.1473: items in a list given to :const can still be modified

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.
This commit is contained in:
Bram Moolenaar
2020-08-17 21:07:22 +02:00
parent 7b22117c4e
commit 021bda5671
5 changed files with 60 additions and 24 deletions

View File

@@ -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)
{