patch 9.1.1356: Vim9: crash when unletting variable
Problem: Vim9: crash when unletting variable
Solution: fix crash, allow to use :unlet
(Hirohito Higashi)
closes: #17226
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f57c065e75
commit
f5bfc48c05
@ -99,7 +99,7 @@ check_vim9_unlet(char_u *name)
|
||||
if (name[1] != ':' || vim_strchr((char_u *)"gwtb", *name) == NULL)
|
||||
{
|
||||
// "unlet s:var" is allowed in legacy script.
|
||||
if (*name == 's' && !script_is_vim9())
|
||||
if (*name == 's' && !in_vim9script())
|
||||
return OK;
|
||||
semsg(_(e_cannot_unlet_str), name);
|
||||
return FAIL;
|
||||
|
||||
Reference in New Issue
Block a user