diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-11-22 21:58:41 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-11-22 21:58:41 +0000 |
commit | 04b568b38f848293e1ae0e680685280151acb386 (patch) | |
tree | 4ecf2787718a1bf00ca71be8190c01a820e6e1db /src/evalvars.c | |
parent | 3b3755fe19e9ded2a1c45f14b2c6fa065bcaf2c6 (diff) |
patch 8.2.3651: Vim9: no error for :lock or :unlock with unknown variablev8.2.3651
Problem: Vim9: no error for :lock or :unlock with unknown variable.
Solution: Give an error. (closes #9188)
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index b56073453b..b1d7b78c81 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -1827,7 +1827,12 @@ do_lock_var( // Normal name or expanded name. di = find_var(lp->ll_name, NULL, TRUE); if (di == NULL) + { + if (in_vim9script()) + semsg(_(e_cannot_find_variable_to_unlock_str), + lp->ll_name); ret = FAIL; + } else if ((di->di_flags & DI_FLAGS_FIX) && di->di_tv.v_type != VAR_DICT && di->di_tv.v_type != VAR_LIST) |