]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.476 v7.3.476
authorBram Moolenaar <Bram@vim.org>
Fri, 23 Mar 2012 13:16:23 +0000 (14:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 23 Mar 2012 13:16:23 +0000 (14:16 +0100)
Problem:    When selecting a block, using "$" to include the end of each line
            and using "A" and typing a backspace strange things happen.
            (Yuangchen Xie)
Solution:   Avoid using a negative length. (Christian Brabandt)

src/ops.c
src/version.c

index 1ddff2882416baa8c95a09efc335c7c843bf6dfb..146c990c68ed8c41908a9c2891695089d3abe20e 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -2602,7 +2602,8 @@ op_insert(oap, count1)
        firstline = ml_get(oap->start.lnum) + bd.textcol;
        if (oap->op_type == OP_APPEND)
            firstline += bd.textlen;
-       if ((ins_len = (long)STRLEN(firstline) - pre_textlen) > 0)
+       if (pre_textlen >= 0
+                    && (ins_len = (long)STRLEN(firstline) - pre_textlen) > 0)
        {
            ins_text = vim_strnsave(firstline, (int)ins_len);
            if (ins_text != NULL)
index b514a5b6dbf87506bcb934a11ee1a3799173154c..f6250cdab6d29845567f896d52863a939e97d716 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    476,
 /**/
     475,
 /**/