]> granicus.if.org Git - vim/commitdiff
updated for version 7.0-041 v7.0.041
authorBram Moolenaar <Bram@vim.org>
Sun, 23 Jul 2006 20:12:24 +0000 (20:12 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 23 Jul 2006 20:12:24 +0000 (20:12 +0000)
src/eval.c
src/version.c

index 3369789b316939a32edadb301c4c9cbde3aa5d24..642f7ea102ca8518f7573677609bcee62de61608 100644 (file)
@@ -16465,9 +16465,12 @@ list2fpos(arg, posp, fnump)
     long       i = 0;
     long       n;
 
-    /* List must be: [fnum, lnum, col, coladd] */
-    if (arg->v_type != VAR_LIST || l == NULL
-                                     || l->lv_len != (fnump == NULL ? 3 : 4))
+    /* List must be: [fnum, lnum, col, coladd], where "fnum" is only there
+     * when "fnump" isn't NULL and "coladd" is optional. */
+    if (arg->v_type != VAR_LIST
+           || l == NULL
+           || l->lv_len < (fnump == NULL ? 2 : 3)
+           || l->lv_len > (fnump == NULL ? 3 : 4))
        return FAIL;
 
     if (fnump != NULL)
@@ -16493,8 +16496,9 @@ list2fpos(arg, posp, fnump)
 #ifdef FEAT_VIRTUALEDIT
     n = list_find_nr(l, i, NULL);
     if (n < 0)
-       return FAIL;
-    posp->coladd = n;
+       posp->coladd = 0;
+    else
+       posp->coladd = n;
 #endif
 
     return OK;
index 038e4acd14890600603a174b91d6d5d6c35ab1d8..48e0fd67e9e1f9dca460dd6ca44ab531c21bc4ac 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    41,
 /**/
     40,
 /**/