Skip to content

Commit 5f63938

Browse files
committed
patch 8.2.2292: Vim: expr test fails
Problem: Vim: expr test fails. Solution: Add missing part of "null" support.
1 parent 6797782 commit 5f63938

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/eval.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3413,12 +3413,19 @@ eval7(
34133413
ret = OK;
34143414
}
34153415
else if (len == 5 && in_vim9script()
3416-
&& STRNCMP(s, "false", 4) == 0)
3416+
&& STRNCMP(s, "false", 5) == 0)
34173417
{
34183418
rettv->v_type = VAR_BOOL;
34193419
rettv->vval.v_number = VVAL_FALSE;
34203420
ret = OK;
34213421
}
3422+
else if (len == 4 && in_vim9script()
3423+
&& STRNCMP(s, "null", 4) == 0)
3424+
{
3425+
rettv->v_type = VAR_SPECIAL;
3426+
rettv->vval.v_number = VVAL_NULL;
3427+
ret = OK;
3428+
}
34223429
else
34233430
ret = eval_variable(s, len, rettv, NULL, TRUE, FALSE);
34243431
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2292,
753755
/**/
754756
2291,
755757
/**/

0 commit comments

Comments
 (0)