]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.578 v7.4.578
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Jan 2015 18:00:38 +0000 (19:00 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Jan 2015 18:00:38 +0000 (19:00 +0100)
Problem:    Using getcurpos() after "$" in an empty line returns a negative
            number.
Solution:   Don't add one when this would overflow. (Hirohito Higashi)

src/eval.c
src/version.c

index 50e87081f7abdfae0f9c05b7f72658e38d8a59dc..e6175f6ba9f58f3b8472adb22ce4b529d15b5a65 100644 (file)
@@ -11941,7 +11941,8 @@ getpos_both(argvars, rettv, getcurpos)
 #endif
                                                              (varnumber_T)0);
        if (getcurpos)
-           list_append_number(l, (varnumber_T)curwin->w_curswant + 1);
+           list_append_number(l, curwin->w_curswant == MAXCOL ?
+                   (varnumber_T)MAXCOL : (varnumber_T)curwin->w_curswant + 1);
     }
     else
        rettv->vval.v_number = FALSE;
index 1367621f4ef933fc9b20aa1894164746adee65cf..7a54fc28518d39a830173fd13ca1f74809de6294 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    578,
 /**/
     577,
 /**/