]> granicus.if.org Git - vim/commitdiff
patch 8.2.2292: Vim: expr test fails v8.2.2292
authorBram Moolenaar <Bram@vim.org>
Sun, 3 Jan 2021 21:05:19 +0000 (22:05 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 3 Jan 2021 21:05:19 +0000 (22:05 +0100)
Problem:    Vim: expr test fails.
Solution:   Add missing part of "null" support.

src/eval.c
src/version.c

index 75cbca96c531e017c63ccb3b0e2c864a38f21031..571e96f70b7a9a0206cfb55a32f213e607d554fb 100644 (file)
@@ -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);
            }
index 4a42d490958b370a56955d7b8b40b93d93189073..6b966286e563e15a6702c09916fb0bb77c782b2f 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2292,
 /**/
     2291,
 /**/