]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.574 v7.4.574
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Jan 2015 16:15:05 +0000 (17:15 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Jan 2015 16:15:05 +0000 (17:15 +0100)
Problem:    No error for eval('$').
Solution:   Check for empty name. (Yasuhiro Matsumoto)

src/eval.c
src/version.c

index fbe824eec10e8056f2362648699a6643dbc5e5e1..50e87081f7abdfae0f9c05b7f72658e38d8a59dc 100644 (file)
@@ -7867,7 +7867,7 @@ get_env_tv(arg, rettv, evaluate)
     if (evaluate)
     {
        if (len == 0)
-           return FAIL; /* can't be an environment variable */
+           return FAIL; /* invalid empty name */
 
        cc = name[len];
        name[len] = NUL;
@@ -10117,14 +10117,18 @@ f_eval(argvars, rettv)
     typval_T   *argvars;
     typval_T   *rettv;
 {
-    char_u     *s;
+    char_u     *s, *p;
 
     s = get_tv_string_chk(&argvars[0]);
     if (s != NULL)
        s = skipwhite(s);
 
+    p = s;
     if (s == NULL || eval1(&s, rettv, TRUE) == FAIL)
     {
+       if (p != NULL && !aborting())
+           EMSG2(_(e_invexpr2), p);
+       need_clr_eos = FALSE;
        rettv->v_type = VAR_NUMBER;
        rettv->vval.v_number = 0;
     }
index ed1a6e341cdef6373dd3b5974cf97db3f4799cdc..51a1a1609b6531806a0965a8fdd3110873e4201d 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    574,
 /**/
     573,
 /**/