summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2012-05-18 12:49:40 +0200
committerBram Moolenaar <bram@vim.org>2012-05-18 12:49:40 +0200
commit21d4084e2b9bd642570d55cb3d85c60c135c8a1e (patch)
tree39ad89c669ce5dd8e3c20b97db2773cf871c20f4
parent410b6c8b71174af477347f5fecabf58105e9f10f (diff)
downloadvim-21d4084e2b9bd642570d55cb3d85c60c135c8a1e.tar.gz
updated for version 7.3.517v7.3.517v7-3-517
Problem: Crash when using "vipvv". (Alexandre Provencio) Solution: Don't let the text length become negative.
-rw-r--r--src/ops.c4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ops.c b/src/ops.c
index bccac779..bc2860a0 100644
--- 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;
diff --git a/src/version.c b/src/version.c
index 5b4bbfc3..0f40176e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 517,
+/**/
516,
/**/
515,