vim-patch:8.2.1471: :const only locks the variable, not the value (#12765)

Problem:    :const only locks the variable, not the value.
Solution:   Lock the value as ":lockvar 1 var" would do. (closes vim/vim#6719)
241572794f
This commit is contained in:
Jan Edmund Lazo
2020-08-16 20:13:52 -04:00
committed by GitHub
parent 83f5bf435d
commit 161cdba1e3
2 changed files with 9 additions and 5 deletions

View File

@@ -9045,7 +9045,7 @@ static void set_var_const(const char *name, const size_t name_len,
}
if (is_const) {
v->di_tv.v_lock |= VAR_LOCKED;
tv_item_lock(&v->di_tv, 1, true);
}
}