summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-16 22:50:01 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-16 22:50:01 +0200
commit241572794f7e93d2f8b762de2300e5f7e4f07628 (patch)
tree86330e27b7484a12b27bbc36062f7a00516f8723 /src/evalvars.c
parentc0f8823ee4ca629db5446ba0a935f68d4a4fb193 (diff)
patch 8.2.1471: :const only locks the variable, not the valuev8.2.1471
Problem: :const only locks the variable, not the value. Solution: Lock the value as ":lockvar 1 var" would do. (closes #6719)
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 2f4a11b2cc..4ebcb45129 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -3087,7 +3087,7 @@ set_var_const(
}
if (flags & LET_IS_CONST)
- di->di_tv.v_lock |= VAR_LOCKED;
+ item_lock(&di->di_tv, 1, TRUE);
}
/*