changeset 23499:fe868a6d2e0a v8.2.2292

patch 8.2.2292: Vim: expr test fails Commit: https://github.com/vim/vim/commit/5f63938447f3eebd1fc4add999ff8d5b42899178 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 3 22:05:19 2021 +0100 patch 8.2.2292: Vim: expr test fails Problem: Vim: expr test fails. Solution: Add missing part of "null" support.
author Bram Moolenaar <Bram@vim.org>
date Sun, 03 Jan 2021 22:15:03 +0100
parents 62e107d43ea2
children f25657e33168
files src/eval.c src/version.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -3413,12 +3413,19 @@ eval7(
 		    ret = OK;
 		}
 		else if (len == 5 && in_vim9script()
-						&& STRNCMP(s, "false", 4) == 0)
+						&& STRNCMP(s, "false", 5) == 0)
 		{
 		    rettv->v_type = VAR_BOOL;
 		    rettv->vval.v_number = VVAL_FALSE;
 		    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
 		    ret = eval_variable(s, len, rettv, NULL, TRUE, FALSE);
 	    }
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2292,
+/**/
     2291,
 /**/
     2290,