summaryrefslogtreecommitdiff
path: root/src/ops.c
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
commit18e00d2c86e609101ef8ae637991c6a29bdb511c (patch)
tree6d5a4f643a84a43d88708899da826e07527947ee /src/ops.c
parent2fc8802fcc42449555ee565819c8a3f06e070895 (diff)
downloadvim-git-18e00d2c86e609101ef8ae637991c6a29bdb511c.tar.gz
updated for version 7.3.517v7.3.517
Problem: Crash when using "vipvv". (Alexandre Provencio) Solution: Don't let the text length become negative.
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ops.c b/src/ops.c
index bccac7790..bc2860a0d 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;