]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.162 v7.3.162
authorBram Moolenaar <Bram@vim.org>
Thu, 21 Apr 2011 12:27:28 +0000 (14:27 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 21 Apr 2011 12:27:28 +0000 (14:27 +0200)
Problem:    No error message when assigning to a list with an index out of
            range. (Yukihiro Nakadaira)
Solution:   Add the error message.

src/eval.c
src/version.c

index c940109aaf9df1ce7bba6d9173a5cd2f29307903..8a021941e96515cc008e7758c050c4c3071f0753 100644 (file)
@@ -2794,6 +2794,8 @@ get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags)
            {
                if (lp->ll_range && !lp->ll_empty2)
                    clear_tv(&var2);
+               if (!quiet)
+                   EMSGN(_(e_listidx), lp->ll_n1);
                return NULL;
            }
 
@@ -2811,7 +2813,11 @@ get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags)
                {
                    ni = list_find(lp->ll_list, lp->ll_n2);
                    if (ni == NULL)
+                   {
+                       if (!quiet)
+                           EMSGN(_(e_listidx), lp->ll_n2);
                        return NULL;
+                   }
                    lp->ll_n2 = list_idx_of_item(lp->ll_list, ni);
                }
 
@@ -2819,7 +2825,11 @@ get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags)
                if (lp->ll_n1 < 0)
                    lp->ll_n1 = list_idx_of_item(lp->ll_list, lp->ll_li);
                if (lp->ll_n2 < lp->ll_n1)
+               {
+                   if (!quiet)
+                       EMSGN(_(e_listidx), lp->ll_n2);
                    return NULL;
+               }
            }
 
            lp->ll_tv = &lp->ll_li->li_tv;
index a1cbb94250f1e7337d502c39047a599fa3ffa30b..5b681a02906685e55f1ba83c81a6a92ab320479b 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    162,
 /**/
     161,
 /**/