1
0
forked from aniani/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)
This commit is contained in:
Bram Moolenaar
2012-03-23 14:16:23 +01:00
parent 5d3a8038b6
commit 5e4b9e9ff8
2 changed files with 4 additions and 1 deletions

View File

@@ -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)

View File

@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
476,
/**/
475,
/**/