summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2006-07-23 20:12:24 +0000
committervimboss <devnull@localhost>2006-07-23 20:12:24 +0000
commitf19b9f6366016f1a8923f7e5db96deb97fc5f07f (patch)
tree8c233d144b64eec3a882bf598d9caa2ebced9de4
parentda97bd5545a66441b6a289f3a040baec13d30031 (diff)
downloadvim-f19b9f6366016f1a8923f7e5db96deb97fc5f07f.tar.gz
updated for version 7.0-041v7.0.041v7-0-041
-rw-r--r--src/eval.c14
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 5 deletions
diff --git a/src/eval.c b/src/eval.c
index 3369789b..642f7ea1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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;
diff --git a/src/version.c b/src/version.c
index 038e4acd..48e0fd67 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 41,
+/**/
40,
/**/
39,