]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-139 v7.2.139
authorBram Moolenaar <Bram@vim.org>
Wed, 11 Mar 2009 16:29:20 +0000 (16:29 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 11 Mar 2009 16:29:20 +0000 (16:29 +0000)
src/misc2.c
src/version.c

index fafe931e67300968091e80927047b315f0b58003..cfc1bad8703d1357bde24dff4af96b19d072891c 100644 (file)
@@ -496,7 +496,8 @@ check_cursor_col()
 {
     colnr_T len;
 #ifdef FEAT_VIRTUALEDIT
-    colnr_T oldcol = curwin->w_cursor.col + curwin->w_cursor.coladd;
+    colnr_T oldcol = curwin->w_cursor.col;
+    colnr_T oldcoladd = curwin->w_cursor.col + curwin->w_cursor.coladd;
 #endif
 
     len = (colnr_T)STRLEN(ml_get_curline());
@@ -535,7 +536,13 @@ check_cursor_col()
     if (oldcol == MAXCOL)
        curwin->w_cursor.coladd = 0;
     else if (ve_flags == VE_ALL)
-       curwin->w_cursor.coladd = oldcol - curwin->w_cursor.col;
+    {
+       if (oldcoladd > curwin->w_cursor.col)
+           curwin->w_cursor.coladd = oldcoladd - curwin->w_cursor.col;
+       else
+           /* avoid weird number when there is a miscalculation or overflow */
+           curwin->w_cursor.coladd = 0;
+    }
 #endif
 }
 
index 3b2548c0d2253dfa312df49406886e668c03089c..541fac6702242c27bf65932ee63538416c444611 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    139,
 /**/
     138,
 /**/