comparison src/eval.c @ 10908:6b6abffbdf59 v8.0.0343

patch 8.0.0343: b:changedtick can be unlocked commit https://github.com/vim/vim/commit/e7877fe0de1426f8de9ada825e4f7b64810c7dbc Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 20 22:35:33 2017 +0100 patch 8.0.0343: b:changedtick can be unlocked Problem: b:changedtick can be unlocked, even though it has no effect. (Nikolai Pavlov) Solution: Add a check and error E940. (closes #1496)
author Christian Brabandt <cb@256bit.org>
date Mon, 20 Feb 2017 22:45:05 +0100
parents 5780bd3a5a7e
children 8bff367672a4
comparison
equal deleted inserted replaced
10907:7b96d04312c2 10908:6b6abffbdf59
2880 2880
2881 /* Normal name or expanded name. */ 2881 /* Normal name or expanded name. */
2882 di = find_var(lp->ll_name, NULL, TRUE); 2882 di = find_var(lp->ll_name, NULL, TRUE);
2883 if (di == NULL) 2883 if (di == NULL)
2884 ret = FAIL; 2884 ret = FAIL;
2885 else if ((di->di_flags & DI_FLAGS_FIX)
2886 && di->di_tv.v_type != VAR_DICT
2887 && di->di_tv.v_type != VAR_LIST)
2888 /* For historic reasons this error is not given for a list or dict.
2889 * E.g., the b: dict could be locked/unlocked. */
2890 EMSG2(_("E940: Cannot lock or unlock variable %s"), lp->ll_name);
2885 else 2891 else
2886 { 2892 {
2887 if (lock) 2893 if (lock)
2888 di->di_flags |= DI_FLAGS_LOCK; 2894 di->di_flags |= DI_FLAGS_LOCK;
2889 else 2895 else