Mercurial > vim
changeset 3510:9a1dba1f969a v7.3.517
updated for version 7.3.517
Problem: Crash when using "vipvv". (Alexandre Provencio)
Solution: Don't let the text length become negative.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 18 May 2012 12:49:40 +0200 |
parents | 5598c71c06a0 |
children | ec546313bffe |
files | src/ops.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;