commit | 241572794f7e93d2f8b762de2300e5f7e4f07628 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sun Aug 16 22:50:01 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Sun Aug 16 22:50:01 2020 +0200 |
tree | 86330e27b7484a12b27bbc36062f7a00516f8723 | |
parent | c0f8823ee4ca629db5446ba0a935f68d4a4fb193 [diff] [blame] |
patch 8.2.1471: :const only locks the variable, not the value Problem: :const only locks the variable, not the value. Solution: Lock the value as ":lockvar 1 var" would do. (closes #6719)
diff --git a/src/evalvars.c b/src/evalvars.c index 2f4a11b..4ebcb45 100644 --- a/src/evalvars.c +++ b/src/evalvars.c
@@ -3087,7 +3087,7 @@ } if (flags & LET_IS_CONST) - di->di_tv.v_lock |= VAR_LOCKED; + item_lock(&di->di_tv, 1, TRUE); } /*