forked from aniani/vim
patch 8.2.1465: Vim9: subscript not handled properly
Problem: Vim9: subscript not handled properly. Solution: Adjust error message. Remove dead code. Disallow string to number conversion in scripts.
This commit is contained in:
@@ -2142,7 +2142,9 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
|
||||
{
|
||||
int error = FALSE;
|
||||
|
||||
if (tv_get_number_chk(rettv, &error) != 0)
|
||||
if (in_vim9script())
|
||||
result = tv2bool(rettv);
|
||||
else if (tv_get_number_chk(rettv, &error) != 0)
|
||||
result = TRUE;
|
||||
clear_tv(rettv);
|
||||
if (error)
|
||||
|
Reference in New Issue
Block a user