0
0
mirror of https://github.com/vim/vim.git synced 2025-10-24 08:54:47 -04:00

patch 8.2.2292: Vim: expr test fails

Problem:    Vim: expr test fails.
Solution:   Add missing part of "null" support.
This commit is contained in:
Bram Moolenaar
2021-01-03 22:05:19 +01:00
parent 6797782127
commit 5f63938447
2 changed files with 10 additions and 1 deletions

View File

@@ -3413,12 +3413,19 @@ eval7(
ret = OK; ret = OK;
} }
else if (len == 5 && in_vim9script() else if (len == 5 && in_vim9script()
&& STRNCMP(s, "false", 4) == 0) && STRNCMP(s, "false", 5) == 0)
{ {
rettv->v_type = VAR_BOOL; rettv->v_type = VAR_BOOL;
rettv->vval.v_number = VVAL_FALSE; rettv->vval.v_number = VVAL_FALSE;
ret = OK; ret = OK;
} }
else if (len == 4 && in_vim9script()
&& STRNCMP(s, "null", 4) == 0)
{
rettv->v_type = VAR_SPECIAL;
rettv->vval.v_number = VVAL_NULL;
ret = OK;
}
else else
ret = eval_variable(s, len, rettv, NULL, TRUE, FALSE); ret = eval_variable(s, len, rettv, NULL, TRUE, FALSE);
} }

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2292,
/**/ /**/
2291, 2291,
/**/ /**/