From: Bram Moolenaar Date: Fri, 23 Mar 2012 13:16:23 +0000 (+0100) Subject: updated for version 7.3.476 X-Git-Tag: v7.3.476 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e4b9e9ff8ebd337875f918078170ebbad03be9a;p=vim updated for version 7.3.476 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) --- diff --git a/src/ops.c b/src/ops.c index 1ddff2882..146c990c6 100644 --- 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) diff --git a/src/version.c b/src/version.c index b514a5b6d..f6250cdab 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 476, /**/ 475, /**/