mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 8.2.3651: Vim9: no error for :lock or :unlock with unknown variable
Problem: Vim9: no error for :lock or :unlock with unknown variable. Solution: Give an error. (closes #9188)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user