]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.517 v7.3.517
authorBram Moolenaar <Bram@vim.org>
Fri, 18 May 2012 10:49:40 +0000 (12:49 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 18 May 2012 10:49:40 +0000 (12:49 +0200)
Problem:    Crash when using "vipvv". (Alexandre Provencio)
Solution:   Don't let the text length become negative.

src/ops.c
src/version.c

index bccac779043d339c64b77ec299746640dabaa377..bc2860a0d3612e8b4c2a846c0abc545ef7681e02 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -3042,6 +3042,8 @@ op_yank(oap, deleting, mess)
                        }
 #endif
                    }
+                   if (endcol == MAXCOL)
+                       endcol = (colnr_T)STRLEN(p);
                    if (startcol > endcol
 #ifdef FEAT_VIRTUALEDIT
                            || is_oneChar
@@ -3050,8 +3052,6 @@ op_yank(oap, deleting, mess)
                        bd.textlen = 0;
                    else
                    {
-                       if (endcol == MAXCOL)
-                           endcol = (colnr_T)STRLEN(p);
                        bd.textlen = endcol - startcol + oap->inclusive;
                    }
                    bd.textstart = p + startcol;
index 5b4bbfc3e714a0923f5fc180e7ca274c0ee850f2..0f40176e0530a1c3737136da3fcdca34ab9782b4 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    517,
 /**/
     516,
 /**/